From 5d1c3777794a871a30cc3b2d788b66e33ee4fa80 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 2 Mar 2003 10:04:48 +0000 Subject: . --- aclocal.m4 | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'aclocal.m4') diff --git a/aclocal.m4 b/aclocal.m4 index 37a06816b..4fce8c304 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1865,10 +1865,34 @@ AC_DEFUN([jm_PREREQ_MEMCHR], AC_CHECK_HEADERS(limits.h stdlib.h bp-sym.h) ]) +# Check for the external symbol, _system_configuration, +# a struct with member `physmem'. +AC_DEFUN([gl_SYS__SYSTEM_CONFIGURATION], + [AC_CACHE_CHECK(for external symbol _system_configuration, + gl_cv_var__system_configuration, + [AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[#include + ]], + [double x = _system_configuration.physmem;])], + [gl_cv_var__system_configuration=yes], + [gl_cv_var__system_configuration=no])]) + + if test $gl_cv_var__system_configuration = yes; then + AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1, + [Define to 1 if you have the external variable, + _system_configuration with a member named physmem.]) + fi + ] +) + AC_DEFUN([jm_PREREQ_PHYSMEM], [ - AC_CHECK_HEADERS(sys/pstat.h unistd.h sys/sysmp.h) - AC_CHECK_FUNCS(pstat_getstatic pstat_getdynamic) + AC_CHECK_HEADERS([unistd.h sys/pstat.h sys/sysmp.h sys/sysinfo.h \ + machine/hal_sysinfo.h sys/table.h sys/param.h sys/sysctl.h \ + sys/systemcfg.h]) + AC_CHECK_FUNCS(pstat_getstatic pstat_getdynamic sysmp getsysinfo sysctl table) + + AC_REQUIRE([gl_SYS__SYSTEM_CONFIGURATION]) ]) AC_DEFUN([jm_PREREQ_POSIXVER], -- cgit v1.2.3-54-g00ecf