Mercurial > hg > octave-kai > gnulib-hg
annotate m4/physmem.m4 @ 14434:7624b26aea3d
sys_socket, netdb: Document problem with socklen_t.
* doc/posix-headers/sys_socket.texi: Mention lack of socklen_t on some
platforms.
* doc/posix-headers/netdb.texi: Likewise.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 19 Mar 2011 13:39:12 +0100 |
parents | 97fc9a21a8fb |
children | cfdbe5c4e833 |
rev | line source |
---|---|
12175
45b975b8ea71
Fix recognition of sys/sysctl.h on OpenBSD 4.0.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
1 # physmem.m4 serial 10 |
14079
97fc9a21a8fb
maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
2 dnl Copyright (C) 2002-2003, 2005-2006, 2008-2011 Free Software Foundation, |
12518
b5e42ef33b49
update nearly all FSF copyright year lists to include 2009
Jim Meyering <meyering@redhat.com>
parents:
12421
diff
changeset
|
3 dnl Inc. |
5611
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4570
diff
changeset
|
4 dnl This file is free software; the Free Software Foundation |
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4570
diff
changeset
|
5 dnl gives unlimited permission to copy and/or distribute it, |
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4570
diff
changeset
|
6 dnl with or without modifications, as long as this notice is preserved. |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 |
4570
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
8 # Check for the external symbol, _system_configuration, |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
9 # a struct with member `physmem'. |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
10 AC_DEFUN([gl_SYS__SYSTEM_CONFIGURATION], |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
9921
diff
changeset
|
11 [AC_CACHE_CHECK([for external symbol _system_configuration], |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
12175
diff
changeset
|
12 gl_cv_var__system_configuration, |
4570
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
13 [AC_LINK_IFELSE([AC_LANG_PROGRAM( |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
12175
diff
changeset
|
14 [[#include <sys/systemcfg.h> |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
12175
diff
changeset
|
15 ]], |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
12175
diff
changeset
|
16 [[double x = _system_configuration.physmem; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
12175
diff
changeset
|
17 if (x > 0.0) return 0;]])], |
4570
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
18 [gl_cv_var__system_configuration=yes], |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
19 [gl_cv_var__system_configuration=no])]) |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
20 |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
21 if test $gl_cv_var__system_configuration = yes; then |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
9921
diff
changeset
|
22 AC_DEFINE([HAVE__SYSTEM_CONFIGURATION], [1], |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
12175
diff
changeset
|
23 [Define to 1 if you have the external variable, |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
12175
diff
changeset
|
24 _system_configuration with a member named physmem.]) |
4570
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
25 fi |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
26 ] |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
27 ) |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
28 |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 AC_DEFUN([gl_PHYSMEM], |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 [ |
5721
abd018cd6020
Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5611
diff
changeset
|
31 AC_LIBOBJ([physmem]) |
abd018cd6020
Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5611
diff
changeset
|
32 |
4570
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
33 # Prerequisites of lib/physmem.c. |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
34 AC_CHECK_HEADERS([sys/pstat.h sys/sysmp.h sys/sysinfo.h \ |
12175
45b975b8ea71
Fix recognition of sys/sysctl.h on OpenBSD 4.0.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
35 machine/hal_sysinfo.h sys/table.h sys/param.h sys/systemcfg.h],,, |
45b975b8ea71
Fix recognition of sys/sysctl.h on OpenBSD 4.0.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
36 [AC_INCLUDES_DEFAULT]) |
45b975b8ea71
Fix recognition of sys/sysctl.h on OpenBSD 4.0.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
37 dnl <sys/sysctl.h> requires <sys/param.h> on OpenBSD 4.0. |
45b975b8ea71
Fix recognition of sys/sysctl.h on OpenBSD 4.0.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
38 AC_CHECK_HEADERS([sys/sysctl.h],,, |
45b975b8ea71
Fix recognition of sys/sysctl.h on OpenBSD 4.0.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
39 [AC_INCLUDES_DEFAULT |
45b975b8ea71
Fix recognition of sys/sysctl.h on OpenBSD 4.0.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
40 #if HAVE_SYS_PARAM_H |
45b975b8ea71
Fix recognition of sys/sysctl.h on OpenBSD 4.0.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
41 # include <sys/param.h> |
45b975b8ea71
Fix recognition of sys/sysctl.h on OpenBSD 4.0.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
42 #endif |
45b975b8ea71
Fix recognition of sys/sysctl.h on OpenBSD 4.0.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
43 ]) |
4570
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
44 |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
9921
diff
changeset
|
45 AC_CHECK_FUNCS([pstat_getstatic pstat_getdynamic sysmp getsysinfo sysctl table]) |
4570
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
46 AC_REQUIRE([gl_SYS__SYSTEM_CONFIGURATION]) |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
47 ]) |