diff options
author | Jim Meyering <jim@meyering.net> | 2003-02-27 17:44:34 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-02-27 17:44:34 +0000 |
commit | 8e2b85814ada761ab0af902c9ad91ef693fa627e (patch) | |
tree | a42e194522307ae565ce25be342d8214ff4e956f /m4 | |
parent | 8b9fe6bd80ee467f853d7bf957bf81b0487dfff8 (diff) | |
download | coreutils-8e2b85814ada761ab0af902c9ad91ef693fa627e.tar.xz |
(gl_SYS__SYSTEM_CONFIGURATION): New function.
(jm_PREREQ_PHYSMEM): Check for new headers and functions.
Use gl_SYS__SYSTEM_CONFIGURATION.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/prereq.m4 | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/m4/prereq.m4 b/m4/prereq.m4 index e9a69f2cc..2fd64b2d8 100644 --- a/m4/prereq.m4 +++ b/m4/prereq.m4 @@ -101,10 +101,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 <sys/systemcfg.h> + ]], + [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) + + AC_REQUIRE([gl_SYS__SYSTEM_CONFIGURATION]) ]) AC_DEFUN([jm_PREREQ_POSIXVER], |