summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in84
1 files changed, 47 insertions, 37 deletions
diff --git a/configure.in b/configure.in
index 24f66d2..78a454f 100644
--- a/configure.in
+++ b/configure.in
@@ -30,31 +30,6 @@ AC_MINIX
30AC_PROG_MAKE_SET 30AC_PROG_MAKE_SET
31AC_PROG_AWK 31AC_PROG_AWK
32 32
33# Check for SunOS statfs brokenness wrt partitions 2GB and larger.
34# If <sys/vfs.h> exists and struct statfs has a member named f_spare,
35# enable the work-around code in fsusage.c.
36AC_MSG_CHECKING([for statfs that truncates block counts])
37AC_CACHE_VAL(fu_cv_sys_truncating_statfs,
38[AC_TRY_COMPILE([
39#if !defined(sun) && !defined(__sun)
40choke -- this is a workaround for a Sun-specific problem
41#endif
42#include <sys/types.h>
43#include <sys/vfs.h>],
44[struct statfs t; long c = *(t.f_spare);],
45fu_cv_sys_truncating_statfs=yes
46AC_MSG_RESULT(yes),
47fu_cv_sys_truncating_statfs=no
48AC_MSG_RESULT(no),
49)])
50if test $fu_cv_sys_truncating_statfs = yes; then
51 AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS, 1,
52[ Define if the block counts reported by statfs may be truncated to 2GB
53 and the correct values may be stored in the f_spare array.
54 (SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem.
55 SunOS 4.1.1 seems not to be affected.)])
56fi
57
58saved_srcdir=$srcdir 33saved_srcdir=$srcdir
59srcdir=$srcdir/lib 34srcdir=$srcdir/lib
60test -f $srcdir/getloadavg.c \ 35test -f $srcdir/getloadavg.c \
@@ -484,19 +459,49 @@ AC_HEADER_TIME
484AC_HEADER_SYS_WAIT 459AC_HEADER_SYS_WAIT
485AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h unistd.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h) 460AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h unistd.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h)
486AC_CHECK_HEADERS(stdarg.h sys/unistd.h unistd.h ctype.h stdlib.h) 461AC_CHECK_HEADERS(stdarg.h sys/unistd.h unistd.h ctype.h stdlib.h)
462AC_CHECK_HEADERS(limits.h sys/param.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h fcntl.h sys/statfs.h sys/dustat.h sys/statvfs.h)
463
464# Define HAVE_INTTYPES_H if <inttypes.h> exists,
465# doesn't clash with <sys/types.h>, and declares uintmax_t.
466
467AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
468[AC_TRY_COMPILE(
469 [#include <sys/types.h>
470#include <inttypes.h>],
471 [uintmax_t i = (uintmax_t) -1;],
472 jm_ac_cv_header_inttypes_h=yes,
473 jm_ac_cv_header_inttypes_h=no)])
474
475if test $jm_ac_cv_header_inttypes_h = yes; then
476 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
477[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
478 and declares uintmax_t. ])
479fi
487 480
488dnl Linux 481# Check for SunOS statfs brokenness wrt partitions 2GB and larger.
489AC_CHECK_HEADERS(sys/vfs.h, 482# If <sys/vfs.h> exists and struct statfs has a member named f_spare,
490 [AC_TRY_COMPILE([#include <sys/vfs.h>], 483# enable the work-around code in fsusage.c.
491 [struct statfs buf; long foo; statfs ("/", &buf); foo = buf.f_namelen;], 484AC_MSG_CHECKING([for statfs that truncates block counts])
492 [AC_DEFINE(HAVE_STRUCT_STATFS,1,[Define if statfs struct can be found])])]) 485AC_CACHE_VAL(fu_cv_sys_truncating_statfs,
493 486[AC_TRY_COMPILE([
494dnl FreeBSD 487#if !defined(sun) && !defined(__sun)
495AC_CHECK_HEADERS(sys/param.h sys/mount.h, 488choke -- this is a workaround for a Sun-specific problem
496 [AC_TRY_COMPILE([#include <sys/param.h> 489#endif
497#include <sys/mount.h>], 490#include <sys/types.h>
498 [struct statfs buf; int foo; statfs ("/", &buf); foo = buf.f_flags;], 491#include <sys/vfs.h>],
499 [AC_DEFINE(HAVE_STRUCT_STATFS,1,[Define if statfs struct can be found])])]) 492[struct statfs t; long c = *(t.f_spare);],
493fu_cv_sys_truncating_statfs=yes
494AC_MSG_RESULT(yes),
495fu_cv_sys_truncating_statfs=no
496AC_MSG_RESULT(no),
497)])
498if test $fu_cv_sys_truncating_statfs = yes; then
499 AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS, 1,
500[ Define if the block counts reported by statfs may be truncated to 2GB
501 and the correct values may be stored in the f_spare array.
502 (SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem.
503 SunOS 4.1.1 seems not to be affected.)])
504fi
500 505
501dnl Checks for typedefs, structures, and compiler characteristics. 506dnl Checks for typedefs, structures, and compiler characteristics.
502AC_C_CONST 507AC_C_CONST
@@ -955,6 +960,11 @@ fi
955 960
956AC_DEFINE_UNQUOTED(DF_COMMAND,"$with_df_command",[path and args for df command]) 961AC_DEFINE_UNQUOTED(DF_COMMAND,"$with_df_command",[path and args for df command])
957 962
963dnl jm_LIST_MOUNTED_FILESYSTEMS([list_mounted_fs=yes], [list_mounted_fs=no])
964jm_FSTYPENAME
965jm_FILE_SYSTEM_USAGE([space=yes], [space=no])
966jm_AFS
967
958AC_PATH_PROG(PATH_TO_PING,ping) 968AC_PATH_PROG(PATH_TO_PING,ping)
959AC_PATH_PROG(PATH_TO_PING6,ping6) 969AC_PATH_PROG(PATH_TO_PING6,ping6)
960 970