diff options
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 84 |
1 files changed, 47 insertions, 37 deletions
diff --git a/configure.in b/configure.in index 24f66d20..78a454ff 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -30,31 +30,6 @@ AC_MINIX | |||
| 30 | AC_PROG_MAKE_SET | 30 | AC_PROG_MAKE_SET |
| 31 | AC_PROG_AWK | 31 | AC_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. | ||
| 36 | AC_MSG_CHECKING([for statfs that truncates block counts]) | ||
| 37 | AC_CACHE_VAL(fu_cv_sys_truncating_statfs, | ||
| 38 | [AC_TRY_COMPILE([ | ||
| 39 | #if !defined(sun) && !defined(__sun) | ||
| 40 | choke -- 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);], | ||
| 45 | fu_cv_sys_truncating_statfs=yes | ||
| 46 | AC_MSG_RESULT(yes), | ||
| 47 | fu_cv_sys_truncating_statfs=no | ||
| 48 | AC_MSG_RESULT(no), | ||
| 49 | )]) | ||
| 50 | if 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.)]) | ||
| 56 | fi | ||
| 57 | |||
| 58 | saved_srcdir=$srcdir | 33 | saved_srcdir=$srcdir |
| 59 | srcdir=$srcdir/lib | 34 | srcdir=$srcdir/lib |
| 60 | test -f $srcdir/getloadavg.c \ | 35 | test -f $srcdir/getloadavg.c \ |
| @@ -484,19 +459,49 @@ AC_HEADER_TIME | |||
| 484 | AC_HEADER_SYS_WAIT | 459 | AC_HEADER_SYS_WAIT |
| 485 | AC_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) | 460 | AC_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) |
| 486 | AC_CHECK_HEADERS(stdarg.h sys/unistd.h unistd.h ctype.h stdlib.h) | 461 | AC_CHECK_HEADERS(stdarg.h sys/unistd.h unistd.h ctype.h stdlib.h) |
| 462 | AC_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 | |||
| 467 | AC_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 | |||
| 475 | if 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. ]) | ||
| 479 | fi | ||
| 487 | 480 | ||
| 488 | dnl Linux | 481 | # Check for SunOS statfs brokenness wrt partitions 2GB and larger. |
| 489 | AC_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;], | 484 | AC_MSG_CHECKING([for statfs that truncates block counts]) |
| 492 | [AC_DEFINE(HAVE_STRUCT_STATFS,1,[Define if statfs struct can be found])])]) | 485 | AC_CACHE_VAL(fu_cv_sys_truncating_statfs, |
| 493 | 486 | [AC_TRY_COMPILE([ | |
| 494 | dnl FreeBSD | 487 | #if !defined(sun) && !defined(__sun) |
| 495 | AC_CHECK_HEADERS(sys/param.h sys/mount.h, | 488 | choke -- 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);], |
| 493 | fu_cv_sys_truncating_statfs=yes | ||
| 494 | AC_MSG_RESULT(yes), | ||
| 495 | fu_cv_sys_truncating_statfs=no | ||
| 496 | AC_MSG_RESULT(no), | ||
| 497 | )]) | ||
| 498 | if 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.)]) | ||
| 504 | fi | ||
| 500 | 505 | ||
| 501 | dnl Checks for typedefs, structures, and compiler characteristics. | 506 | dnl Checks for typedefs, structures, and compiler characteristics. |
| 502 | AC_C_CONST | 507 | AC_C_CONST |
| @@ -955,6 +960,11 @@ fi | |||
| 955 | 960 | ||
| 956 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$with_df_command",[path and args for df command]) | 961 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$with_df_command",[path and args for df command]) |
| 957 | 962 | ||
| 963 | dnl jm_LIST_MOUNTED_FILESYSTEMS([list_mounted_fs=yes], [list_mounted_fs=no]) | ||
| 964 | jm_FSTYPENAME | ||
| 965 | jm_FILE_SYSTEM_USAGE([space=yes], [space=no]) | ||
| 966 | jm_AFS | ||
| 967 | |||
| 958 | AC_PATH_PROG(PATH_TO_PING,ping) | 968 | AC_PATH_PROG(PATH_TO_PING,ping) |
| 959 | AC_PATH_PROG(PATH_TO_PING6,ping6) | 969 | AC_PATH_PROG(PATH_TO_PING6,ping6) |
| 960 | 970 | ||
