source: trunk/coreutils/m4/physmem.m4@ 2747

Last change on this file since 2747 was 2554, checked in by bird, 20 years ago

coretuils-5.94

File size: 1.4 KB
Line 
1# physmem.m4 serial 5
2dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7# Check for the external symbol, _system_configuration,
8# a struct with member `physmem'.
9AC_DEFUN([gl_SYS__SYSTEM_CONFIGURATION],
10 [AC_CACHE_CHECK(for external symbol _system_configuration,
11 gl_cv_var__system_configuration,
12 [AC_LINK_IFELSE([AC_LANG_PROGRAM(
13 [[#include <sys/systemcfg.h>
14 ]],
15 [double x = _system_configuration.physmem;])],
16 [gl_cv_var__system_configuration=yes],
17 [gl_cv_var__system_configuration=no])])
18
19 if test $gl_cv_var__system_configuration = yes; then
20 AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1,
21 [Define to 1 if you have the external variable,
22 _system_configuration with a member named physmem.])
23 fi
24 ]
25)
26
27AC_DEFUN([gl_PHYSMEM],
28[
29 AC_LIBSOURCES([physmem.c, physmem.h])
30 AC_LIBOBJ([physmem])
31
32 # Prerequisites of lib/physmem.c.
33 AC_CHECK_HEADERS([sys/pstat.h sys/sysmp.h sys/sysinfo.h \
34 machine/hal_sysinfo.h sys/table.h sys/param.h sys/sysctl.h \
35 sys/systemcfg.h],,, [AC_INCLUDES_DEFAULT])
36
37 AC_CHECK_FUNCS(pstat_getstatic pstat_getdynamic sysmp getsysinfo sysctl table)
38 AC_REQUIRE([gl_SYS__SYSTEM_CONFIGURATION])
39])
Note: See TracBrowser for help on using the repository browser.