libvirt/gnulib/m4/physmem.m4

40 lines
1.4 KiB
Plaintext
Raw Normal View History

# physmem.m4 serial 9
dnl Copyright (C) 2002-2003, 2005-2006, 2008-2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# 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>
]],
update from gnulib * gnulib/lib/inet_ntop.h: Remove file. * gnulib/m4/onceonly_2_57.m4: Remove file. * build-aux/useless-if-before-free: Update. * build-aux/vc-list-files: Update. * gnulib/lib/.cvsignore: Update. * gnulib/lib/Makefile.am: Update. * gnulib/lib/fseeko.c: Update. * gnulib/lib/getaddrinfo.c: Update. * gnulib/lib/getdelim.c: Update. * gnulib/lib/inet_ntop.c: Update. * gnulib/lib/inet_ntop.h: Update. * gnulib/lib/poll.c: Update. * gnulib/lib/snprintf.c: Update. * gnulib/lib/stdlib.in.h: Update. * gnulib/lib/string.in.h: Update. * gnulib/lib/sys_socket.in.h: Update. * gnulib/lib/sys_stat.in.h: Update. * gnulib/lib/vasnprintf.c: Update. * gnulib/lib/vasprintf.c: Update. * gnulib/lib/wchar.in.h: Update. * gnulib/m4/arpa_inet_h.m4: Update. * gnulib/m4/extensions.m4: Update. * gnulib/m4/gnulib-common.m4: Update. * gnulib/m4/gnulib-comp.m4: Update. * gnulib/m4/include_next.m4: Update. * gnulib/m4/inet_ntop.m4: Update. * gnulib/m4/netinet_in_h.m4: Update. * gnulib/m4/onceonly_2_57.m4: Update. * gnulib/m4/physmem.m4: Update. * gnulib/m4/snprintf.m4: Update. * gnulib/m4/stdint.m4: Update. * gnulib/m4/stdio_h.m4: Update. * gnulib/m4/stdlib_h.m4: Update. * gnulib/m4/string_h.m4: Update. * gnulib/m4/strndup.m4: Update. * gnulib/m4/sys_select_h.m4: Update. * gnulib/m4/sys_socket_h.m4: Update. * gnulib/m4/sys_stat_h.m4: Update. * gnulib/m4/vasnprintf.m4: Update. * gnulib/tests/Makefile.am: Update. * gnulib/tests/test-fseeko.c: Update. * gnulib/tests/test-getaddrinfo.c: Update. * gnulib/tests/test-getdelim.c: Update. * gnulib/tests/test-getline.c: Update. * gnulib/tests/test-lseek.c: Update. * gnulib/tests/test-snprintf.c: Update. * gnulib/tests/test-sys_stat.c: Update. * gnulib/tests/test-vasnprintf.c: Update. * gnulib/tests/test-vasprintf.c: Update.
2008-04-29 19:52:26 +00:00
[[double x = _system_configuration.physmem;
if (x > 0.0) return 0;]])],
[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([gl_PHYSMEM],
[
AC_LIBOBJ([physmem])
# Prerequisites of lib/physmem.c.
AC_CHECK_HEADERS([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_INCLUDES_DEFAULT])
AC_CHECK_FUNCS([pstat_getstatic pstat_getdynamic sysmp getsysinfo sysctl table])
AC_REQUIRE([gl_SYS__SYSTEM_CONFIGURATION])
])