added --with-nisplus-home option
[samba.git] / source3 / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(byteorder.h)
3 AC_CONFIG_HEADER(config.h)
4
5 dnl Checks for programs.
6 AC_PROG_CC
7 AC_PROG_INSTALL
8 AC_SUBST(SHELL)
9 AC_PROG_AWK
10
11 AC_CANONICAL_SYSTEM
12 case "$host_os" in
13         *linux*)   AC_DEFINE(LINUX);;
14         *solaris*) AC_DEFINE(SUNOS5);;
15         *sunos*) AC_DEFINE(SUNOS4);;
16         *irix*) AC_DEFINE(IRIX);;
17         *aix*) AC_DEFINE(AIX);;
18         *hpux*) AC_DEFINE(HPUX);;
19         *qnx*) AC_DEFINE(QNX);;
20         *osf1*) AC_DEFINE(OSF1);;
21         *sco*) AC_DEFINE(SCO);;
22         *next2*) AC_DEFINE(NEXT2);;
23 esac
24
25 AC_INLINE
26 AC_HEADER_STDC
27 AC_HEADER_DIRENT
28 AC_HEADER_TIME
29 AC_HEADER_SYS_WAIT
30 AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h)
31 AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h net/if.h)
32 AC_CHECK_HEADERS(compat.h sys/param.h ctype.h sys/wait.h sys/ioctl.h)
33 AC_CHECK_HEADERS(sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h)
34 AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h)
35 AC_CHECK_HEADERS(sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h)
36 AC_CHECK_HEADERS(shadow.h netinet/tcp.h sys/security.h security/pam_appl.h)
37
38 AC_CHECK_SIZEOF(int)
39 AC_CHECK_SIZEOF(long)
40 AC_CHECK_SIZEOF(short)
41
42 AC_C_CONST
43 AC_C_INLINE
44 AC_C_BIGENDIAN
45 AC_C_CHAR_UNSIGNED
46
47 AC_TYPE_SIGNAL
48 AC_TYPE_UID_T
49 AC_TYPE_MODE_T
50 AC_TYPE_OFF_T
51 AC_TYPE_SIZE_T
52 AC_TYPE_PID_T
53 AC_STRUCT_ST_RDEV
54 AC_CHECK_TYPE(ino_t,unsigned)
55
56 echo $ac_n "checking for errno in errno.h... $ac_c"
57 AC_TRY_COMPILE([#include <errno.h>],[int i = errno],
58 echo yes; AC_DEFINE(HAVE_ERRNO_DECL),
59 echo no)
60
61 AC_FUNC_MEMCMP
62
63 ###############################################
64 # test for where we get crypt() from
65 if test "$ac_cv_lib_crypt_crypt" = "yes"; then
66   AC_CHECK_LIB(crypt, crypt)
67   AC_DEFINE(HAVE_CRYPT)
68 fi
69 if test "$ac_cv_lib_crypt_crypt" = "no" || 
70    test "$ac_cv_lib_crypt_crypt" = ""; then
71 # look for crypt 
72 AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT), 
73 [case "$LIBS" in
74 *-lcrypt*) ;;
75 *) AC_CHECK_LIB(crypt, crypt) ;;
76 esac
77 if test "$ac_cv_lib_crypt_crypt" = "yes"; then
78   ac_cv_func_crypt=yes
79   AC_DEFINE(HAVE_CRYPT)
80 fi])
81 fi
82
83
84 ###############################################
85 # test for where we get pam_authenticate() from
86 # might need libdl for this to work
87 if test "$ac_cv_header_security_pam_appl_h" = "yes"; then
88   AC_HAVE_LIBRARY(dl)
89 fi
90 if test "$ac_cv_lib_pam_pam_authenticate" = "yes"; then
91   AC_CHECK_LIB(pam, pam_authenticate)
92   AC_DEFINE(HAVE_PAM_AUTHENTICATE)
93 fi
94 if test "$ac_cv_lib_pam_pam_authenticate" = "no" || 
95    test "$ac_cv_lib_pam_pam_authenticate" = ""; then
96 # look for pam_authenticate
97 AC_CHECK_FUNC(pam_authenticate, AC_DEFINE(HAVE_PAM_AUTHENTICATE), 
98 [case "$LIBS" in
99 *-lpam*) ;;
100 *) AC_CHECK_LIB(pam, pam_authenticate) ;;
101 esac
102 if test "$ac_cv_lib_pam_pam_authenticate" = "yes"; then
103   ac_cv_func_pam_authenticate=yes
104   AC_DEFINE(HAVE_PAM_AUTHENTICATE)
105 fi])
106 fi
107
108
109 AC_CHECK_FUNCS(waitpid getcwd strdup strerror chown chmod chroot)
110 AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync execl)
111 AC_CHECK_FUNCS(memmove vsnprintf setsid glob strpbrk pipe crypt16 getauthuid)
112 AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction innetgr)
113 AC_CHECK_FUNCS(initgroups select rdchk getgrnam pathconf putprpwnam)
114 AC_CHECK_FUNCS(setresuid setuidx setgroups mktime rename ftruncate)
115 AC_CHECK_FUNCS(set_auth_parameters atexit grantpt getspnam dup2)
116 AC_CHECK_FUNCS(bigcrypt getprpwnam setluid yp_get_default_domain getpwanam)
117
118 echo $ac_n "checking for long long ... $ac_c"
119 AC_TRY_RUN([#include <stdio.h>
120 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }],
121 echo yes;AC_DEFINE(HAVE_LONGLONG), 
122 echo no)
123
124 echo $ac_n "checking for off64_t ... $ac_c"
125 AC_TRY_RUN([#include <stdio.h>
126 #include <sys/stat.h>
127 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }],
128 echo yes;AC_DEFINE(HAVE_OFF64_T), 
129 echo no)
130
131 echo $ac_n "checking for union semun ... $ac_c"
132 AC_TRY_RUN([
133 #include <sys/types.h>
134 #include <sys/ipc.h>
135 #include <sys/sem.h>
136 main() { union semun ss; exit(0); }],
137 echo yes;AC_DEFINE(HAVE_UNION_SEMUN), 
138 echo no)
139
140 echo $ac_n "checking for unsigned char ... $ac_c"
141 AC_TRY_RUN([#include <stdio.h>
142 main() { char c; c=250; exit((c > 0)?0:1); }],
143 echo yes;AC_DEFINE(HAVE_UNSIGNED_CHAR), 
144 echo no)
145
146 echo $ac_n "checking for sin_len in sock ... $ac_c"
147 AC_TRY_COMPILE([#include <sys/types.h>
148 #include <sys/socket.h>
149 #include <netinet/in.h>],
150 [struct sockaddr_in sock; sock.sin_len = sizeof(sock);],
151 echo yes;AC_DEFINE(HAVE_SOCK_SIN_LEN), 
152 echo no)
153
154 echo $ac_n "checking for __FILE__ macro ... $ac_c"
155 AC_TRY_COMPILE([#include <stdio.h>], [printf("%s\n", __FILE__);],
156 echo yes;AC_DEFINE(HAVE_FILE_MACRO), 
157 echo no)
158
159 echo $ac_n "checking for __FUNCTION__ macro ... $ac_c"
160 AC_TRY_COMPILE([#include <stdio.h>], [printf("%s\n", __FUNCTION__);],
161 echo yes;AC_DEFINE(HAVE_FUNCTION_MACRO), 
162 echo no)
163
164 echo $ac_n "checking if gettimeofday takes tz argument ... $ac_c"
165 AC_TRY_RUN([
166 #include <sys/time.h>
167 #include <unistd.h>
168 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}],
169            echo yes;AC_DEFINE(HAVE_GETTIMEOFDAY_TZ),
170            echo no)
171
172
173 echo $ac_n "checking for broken readdir ... $ac_c"
174 AC_TRY_RUN([#include <sys/types.h>
175 #include <dirent.h>
176 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
177 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
178 di->d_name[0] == 0) exit(0); exit(1);} ],
179 echo yes - you are using the broken /usr/ucb/cc;AC_DEFINE(HAVE_BROKEN_READDIR), 
180 echo no)
181
182 echo $ac_n "checking for utimbuf ... $ac_c"
183 AC_TRY_COMPILE([#include <sys/types.h>
184 #include <utime.h>],
185 [struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));],
186 echo yes;AC_DEFINE(HAVE_UTIMBUF), 
187 echo no)
188
189 echo $ac_n "checking for ftruncate extend ... $ac_c"
190 AC_TRY_RUN([#include "tests/ftruncate.c"],
191            echo yes;AC_DEFINE(HAVE_FTRUNCATE_EXTEND), 
192            echo no)
193
194 # The following test taken from the cvs sources
195 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
196 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
197 # libsocket.so which has a bad implementation of gethostbyname (it
198 # only looks in /etc/hosts), so we only look for -lsocket if we need
199 # it.
200 AC_CHECK_FUNC(connect, :, 
201 [case "$LIBS" in
202 *-lnsl*) ;;
203 *) AC_CHECK_LIB(nsl_s, printf) ;;
204 esac
205 case "$LIBS" in
206 *-lnsl*) ;;
207 *) AC_CHECK_LIB(nsl, printf) ;;
208 esac
209 case "$LIBS" in
210 *-lsocket*) ;;
211 *) AC_CHECK_LIB(socket, connect) ;;
212 esac
213 case "$LIBS" in
214 *-linet*) ;;
215 *) AC_CHECK_LIB(inet, connect) ;;
216 esac
217 dnl We can't just call AC_CHECK_FUNCS(connect) here, because the value
218 dnl has been cached.
219 if test "$ac_cv_lib_socket_connect" = "yes" || 
220    test "$ac_cv_lib_inet_connect" = "yes"; then
221   ac_cv_func_connect=yes
222   AC_DEFINE(HAVE_CONNECT)
223 fi])
224
225 echo $ac_n "checking for broken getgroups ... $ac_c"
226 AC_TRY_RUN([#include "tests/getgroups.c"],
227            echo yes;AC_DEFINE(HAVE_BROKEN_GETGROUPS), 
228            echo no)
229
230
231 echo $ac_n "checking for broken inet_ntoa ... $ac_c"
232 AC_TRY_RUN([
233 #include <stdio.h>
234 #include <sys/types.h>
235 #include <netinet/in.h>
236 #include <arpa/inet.h>
237 main() { struct in_addr ip; ip.s_addr = 0x12345678;
238 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
239     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
240 exit(1);}],
241            echo yes;AC_DEFINE(REPLACE_INET_NTOA), 
242            echo no)
243
244 echo $ac_n "checking for root ... $ac_c"
245 AC_TRY_RUN([main() { exit(getuid() != 0); }],
246            echo yes;AC_DEFINE(HAVE_ROOT), 
247            echo WARNING: running as non-root will disable some tests;)
248
249 netmask=no;
250 echo $ac_n "checking for netmask ifconf ... $ac_c"
251 AC_TRY_RUN([
252 #define HAVE_NETMASK_IFCONF 1
253 #define AUTOCONF 1
254 #include "netmask.c"],
255            echo yes;netmask=yes;AC_DEFINE(HAVE_NETMASK_IFCONF),
256            echo no)
257
258 if test $netmask = no; then
259 echo $ac_n "checking for netmask ifreq ... $ac_c"
260 AC_TRY_RUN([
261 #define HAVE_NETMASK_IFREQ 1
262 #define AUTOCONF 1
263 #include "netmask.c"],
264            echo yes;netmask=yes;AC_DEFINE(HAVE_NETMASK_IFREQ),
265            echo no)
266 fi
267
268 if test $netmask = no; then
269 echo $ac_n "checking for netmask AIX ... $ac_c"
270 AC_TRY_RUN([
271 #define HAVE_NETMASK_AIX 1
272 #define AUTOCONF 1
273 #include "netmask.c"],
274            echo yes;netmask=yes;AC_DEFINE(HAVE_NETMASK_AIX),
275            echo no)
276 fi
277
278 echo $ac_n "checking for trapdoor seteuid ... $ac_c"
279 AC_TRY_RUN([#include "tests/trapdoor.c"],
280            echo no,
281            echo yes;AC_DEFINE(HAVE_TRAPDOOR_UID))
282
283 echo $ac_n "checking for shared mmap ... $ac_c"
284 AC_TRY_RUN([#include "tests/shared_mmap.c"],
285            echo yes;AC_DEFINE(HAVE_SHARED_MMAP), 
286            echo no)
287
288 echo $ac_n "checking for fcntl locking ... $ac_c"
289 AC_TRY_RUN([#include "tests/fcntl_lock.c"],
290            echo yes;AC_DEFINE(HAVE_FCNTL_LOCK), 
291            echo no)
292
293 echo $ac_n "checking for sysv ipc ... $ac_c"
294 AC_TRY_RUN([#include "tests/sysv_ipc.c"],
295            echo yes;AC_DEFINE(HAVE_SYSV_IPC), 
296            echo no)
297
298 #################################################
299 # check for the AFS filesystem
300 AC_MSG_CHECKING(whether to use AFS)
301 AC_ARG_WITH(afs,
302 [  --with-afs     Include AFS support
303   --without-afs  Don't include AFS support (default)],
304 [ case "$withval" in
305   yes)
306     AC_MSG_RESULT(yes)
307     AC_DEFINE(WITH_AFS)
308     ;;
309   *)
310     AC_MSG_RESULT(no)
311     ;;
312   esac ],
313   AC_MSG_RESULT(no)
314 )
315
316
317 #################################################
318 # check for the DFS auth system
319 AC_MSG_CHECKING(whether to use DFS auth)
320 AC_ARG_WITH(dfs,
321 [  --with-dfs     Include DFS support
322   --without-dfs  Don't include DFS support (default)],
323 [ case "$withval" in
324   yes)
325     AC_MSG_RESULT(yes)
326     AC_DEFINE(WITH_DFS)
327     ;;
328   *)
329     AC_MSG_RESULT(no)
330     ;;
331   esac ],
332   AC_MSG_RESULT(no)
333 )
334
335 #################################################
336 # check for automount support
337 AC_MSG_CHECKING(whether to use AUTOMOUNT)
338 AC_ARG_WITH(automount,
339 [  --with-automount     Include AUTOMOUNT support
340   --without-automount  Don't include AUTOMOUNT support (default)],
341 [ case "$withval" in
342   yes)
343     AC_MSG_RESULT(yes)
344     AC_DEFINE(WITH_AUTOMOUNT)
345     ;;
346   *)
347     AC_MSG_RESULT(no)
348     ;;
349   esac ],
350   AC_MSG_RESULT(no)
351 )
352
353 #################################################
354 # check for a LDAP password database
355 AC_MSG_CHECKING(whether to use LDAP password database)
356 AC_ARG_WITH(ldap,
357 [  --with-ldap     Include LDAP support
358   --without-ldap  Don't include LDAP support (default)],
359 [ case "$withval" in
360   yes)
361     AC_MSG_RESULT(yes)
362     AC_DEFINE(WITH_LDAP)
363     ;;
364   *)
365     AC_MSG_RESULT(no)
366     ;;
367   esac ],
368   AC_MSG_RESULT(no)
369 )
370
371 #################################################
372 # check for a NISPLUS password database
373 AC_MSG_CHECKING(whether to use NISPLUS password database)
374 AC_ARG_WITH(nisplus,
375 [  --with-nisplus     Include NISPLUS password database support
376   --without-nisplus  Don't include NISPLUS password database support (default)],
377 [ case "$withval" in
378   yes)
379     AC_MSG_RESULT(yes)
380     AC_DEFINE(WITH_NISPLUS)
381     ;;
382   *)
383     AC_MSG_RESULT(no)
384     ;;
385   esac ],
386   AC_MSG_RESULT(no)
387 )
388
389 #################################################
390 # check for a NISPLUS_HOME support 
391 AC_MSG_CHECKING(whether to use NISPLUS_HOME)
392 AC_ARG_WITH(nisplus-home,
393 [  --with-nisplus-home     Include NISPLUS_HOME support
394   --without-nisplus-home  Don't include NISPLUS_HOME support (default)],
395 [ case "$withval" in
396   yes)
397     AC_MSG_RESULT(yes)
398     AC_DEFINE(WITH_NISPLUS_HOME)
399     ;;
400   *)
401     AC_MSG_RESULT(no)
402     ;;
403   esac ],
404   AC_MSG_RESULT(no)
405 )
406
407 #################################################
408 # check for the secure socket layer
409 AC_MSG_CHECKING(whether to use SSL)
410 AC_ARG_WITH(ssl,
411 [  --with-ssl     Include SSL support
412   --without-ssl  Don't include SSL support (default)],
413 [ case "$withval" in
414   yes)
415     AC_MSG_RESULT(yes)
416     AC_DEFINE(WITH_SSL)
417     ;;
418   *)
419     AC_MSG_RESULT(no)
420     ;;
421   esac ],
422   AC_MSG_RESULT(no)
423 )
424
425 #################################################
426 # check for experimental mmap support
427 AC_MSG_CHECKING(whether to use MMAP)
428 AC_ARG_WITH(mmap,
429 [  --with-mmap     Include experimental MMAP support
430   --without-mmap  Don't include MMAP support (default)],
431 [ case "$withval" in
432   yes)
433     AC_MSG_RESULT(yes)
434     AC_DEFINE(WITH_MMAP)
435     ;;
436   *)
437     AC_MSG_RESULT(no)
438     ;;
439   esac ],
440   AC_MSG_RESULT(no)
441 )
442
443 #################################################
444 # check for syslog logging
445 AC_MSG_CHECKING(whether to use syslog logging)
446 AC_ARG_WITH(syslog,
447 [  --with-syslog     Include experimental SYSLOG support
448   --without-syslog  Don't include SYSLOG support (default)],
449 [ case "$withval" in
450   yes)
451     AC_MSG_RESULT(yes)
452     AC_DEFINE(WITH_SYSLOG)
453     ;;
454   *)
455     AC_MSG_RESULT(no)
456     ;;
457   esac ],
458   AC_MSG_RESULT(no)
459 )
460
461
462 #################################################
463 # these tests are taken from the GNU fileutils package
464 AC_CHECKING(how to get filesystem space usage)
465 space=no
466
467 # Perform only the link test since it seems there are no variants of the
468 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
469 # because that got a false positive on SCO OSR5.  Adding the declaration
470 # of a `struct statvfs' causes this test to fail (as it should) on such
471 # systems.  That system is reported to work fine with STAT_STATFS4 which
472 # is what it gets when this test fails.
473 if test $space = no; then
474   # SVR4
475   AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
476                  [AC_TRY_LINK([#include <sys/types.h>
477 #include <sys/statvfs.h>],
478                               [struct statvfs fsd; statvfs (0, &fsd);],
479                               fu_cv_sys_stat_statvfs=yes,
480                               fu_cv_sys_stat_statvfs=no)])
481   if test $fu_cv_sys_stat_statvfs = yes; then
482     space=yes
483     AC_DEFINE(STAT_STATVFS)
484   fi
485 fi
486
487 if test $space = no; then
488   # DEC Alpha running OSF/1
489   AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
490   AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
491   [AC_TRY_RUN([
492 #include <sys/param.h>
493 #include <sys/types.h>
494 #include <sys/mount.h>
495   main ()
496   {
497     struct statfs fsd;
498     fsd.f_fsize = 0;
499     exit (statfs (".", &fsd, sizeof (struct statfs)));
500   }],
501   fu_cv_sys_stat_statfs3_osf1=yes,
502   fu_cv_sys_stat_statfs3_osf1=no,
503   fu_cv_sys_stat_statfs3_osf1=no)])
504   AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
505   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
506     space=yes
507     AC_DEFINE(STAT_STATFS3_OSF1)
508   fi
509 fi
510
511 if test $space = no; then
512 # AIX
513   AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
514 member (AIX, 4.3BSD)])
515   AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
516   [AC_TRY_RUN([
517 #ifdef HAVE_SYS_PARAM_H
518 #include <sys/param.h>
519 #endif
520 #ifdef HAVE_SYS_MOUNT_H
521 #include <sys/mount.h>
522 #endif
523 #ifdef HAVE_SYS_VFS_H
524 #include <sys/vfs.h>
525 #endif
526   main ()
527   {
528   struct statfs fsd;
529   fsd.f_bsize = 0;
530   exit (statfs (".", &fsd));
531   }],
532   fu_cv_sys_stat_statfs2_bsize=yes,
533   fu_cv_sys_stat_statfs2_bsize=no,
534   fu_cv_sys_stat_statfs2_bsize=no)])
535   AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
536   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
537     space=yes
538     AC_DEFINE(STAT_STATFS2_BSIZE)
539   fi
540 fi
541
542 if test $space = no; then
543 # SVR3
544   AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
545   AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
546   [AC_TRY_RUN([#include <sys/types.h>
547 #include <sys/statfs.h>
548   main ()
549   {
550   struct statfs fsd;
551   exit (statfs (".", &fsd, sizeof fsd, 0));
552   }],
553     fu_cv_sys_stat_statfs4=yes,
554     fu_cv_sys_stat_statfs4=no,
555     fu_cv_sys_stat_statfs4=no)])
556   AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
557   if test $fu_cv_sys_stat_statfs4 = yes; then
558     space=yes
559     AC_DEFINE(STAT_STATFS4)
560   fi
561 fi
562
563 if test $space = no; then
564 # 4.4BSD and NetBSD
565   AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
566 member (4.4BSD and NetBSD)])
567   AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
568   [AC_TRY_RUN([#include <sys/types.h>
569 #ifdef HAVE_SYS_PARAM_H
570 #include <sys/param.h>
571 #endif
572 #ifdef HAVE_SYS_MOUNT_H
573 #include <sys/mount.h>
574 #endif
575   main ()
576   {
577   struct statfs fsd;
578   fsd.f_fsize = 0;
579   exit (statfs (".", &fsd));
580   }],
581   fu_cv_sys_stat_statfs2_fsize=yes,
582   fu_cv_sys_stat_statfs2_fsize=no,
583   fu_cv_sys_stat_statfs2_fsize=no)])
584   AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
585   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
586     space=yes
587     AC_DEFINE(STAT_STATFS2_FSIZE)
588   fi
589 fi
590
591 if test $space = no; then
592   # Ultrix
593   AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
594   AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
595   [AC_TRY_RUN([#include <sys/types.h>
596 #ifdef HAVE_SYS_PARAM_H
597 #include <sys/param.h>
598 #endif
599 #ifdef HAVE_SYS_MOUNT_H
600 #include <sys/mount.h>
601 #endif
602 #ifdef HAVE_SYS_FS_TYPES_H
603 #include <sys/fs_types.h>
604 #endif
605   main ()
606   {
607   struct fs_data fsd;
608   /* Ultrix's statfs returns 1 for success,
609      0 for not mounted, -1 for failure.  */
610   exit (statfs (".", &fsd) != 1);
611   }],
612   fu_cv_sys_stat_fs_data=yes,
613   fu_cv_sys_stat_fs_data=no,
614   fu_cv_sys_stat_fs_data=no)])
615   AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
616   if test $fu_cv_sys_stat_fs_data = yes; then
617     space=yes
618     AC_DEFINE(STAT_STATFS2_FS_DATA)
619   fi
620 fi
621
622
623 AC_OUTPUT(Makefile tests/dummy client/dummy lib/dummy lib/rpc/dummy
624 lib/rpc/client/dummy lib/rpc/include/dummy lib/rpc/parse/dummy
625 lib/rpc/server/dummy lib/smb/dummy ubiqx/dummy web/dummy)