diff options
Diffstat (limited to 'src/configure.ac')
-rw-r--r-- | src/configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/configure.ac b/src/configure.ac index 798e9b8942..0bb5cc557c 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -4095,6 +4095,20 @@ AC_TRY_COMPILE( AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT), AC_MSG_RESULT(no)) +dnl struct sysinfo may have the uptime field or not +AC_MSG_CHECKING(for sysinfo.uptime) +AC_TRY_COMPILE( +[#include <sys/types.h> +#include <sys/sysinfo.h>], +[ struct sysinfo sinfo; + long ut; + + (void)sysinfo(&sinfo); + ut = sinfo.uptime; + ], + AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_UPTIME), + AC_MSG_RESULT(no)) + dnl sysconf() may exist but not support what we want to use AC_MSG_CHECKING(for sysconf) AC_TRY_COMPILE( |