Mercurial > hg > octave-kai > gnulib-hg
annotate m4/physmem.m4 @ 11007:f6cba5a556ce
many *.m4 files: improve m4 quoting
99% of this change was performed by running the following commands:
git ls-files | grep '\.m4$' | xargs perl -pi \
-e 's/(AC_\w+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_\w+\((?:\[[^,]+?\], ){1})([^,[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_\w+\((?:\[[^,]+?\], ){2})([^,[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_\w+\((?:\[[^,]+?\], ){3})([^,[()]+?)([,)])/$1\[$2]$3/g'
perl -pi -e 's/\[\.\.\.\]/.../' m4/onceonly.m4
The remainder were to add Copyright dates, increment serial numbers,
undo some changes in comments, exclude m4/intl.m4, and add quotes
around the "1" in ",1" where the unusual spacing prohibited the
above regexps from doing the job. For more details, see
<http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16175>.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Tue, 13 Jan 2009 08:48:48 +0100 |
parents | 01cfd65cc7e0 |
children | 45b975b8ea71 |
rev | line source |
---|---|
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
9921
diff
changeset
|
1 # physmem.m4 serial 9 |
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
9921
diff
changeset
|
2 dnl Copyright (C) 2002-2003, 2005-2006, 2008-2009 Free Software Foundation, Inc. |
5611
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4570
diff
changeset
|
3 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
|
4 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
|
5 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
|
6 |
4570
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
7 # Check for the external symbol, _system_configuration, |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
8 # a struct with member `physmem'. |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
9 AC_DEFUN([gl_SYS__SYSTEM_CONFIGURATION], |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
9921
diff
changeset
|
10 [AC_CACHE_CHECK([for external symbol _system_configuration], |
4570
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
11 gl_cv_var__system_configuration, |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
12 [AC_LINK_IFELSE([AC_LANG_PROGRAM( |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
13 [[#include <sys/systemcfg.h> |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
14 ]], |
9921
01cfd65cc7e0
Fix underquoting of AC_LANG_PROGRAM arguments.
Bruno Haible <bruno@clisp.org>
parents:
7356
diff
changeset
|
15 [[double x = _system_configuration.physmem; |
01cfd65cc7e0
Fix underquoting of AC_LANG_PROGRAM arguments.
Bruno Haible <bruno@clisp.org>
parents:
7356
diff
changeset
|
16 if (x > 0.0) return 0;]])], |
4570
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
17 [gl_cv_var__system_configuration=yes], |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
18 [gl_cv_var__system_configuration=no])]) |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
19 |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
20 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
|
21 AC_DEFINE([HAVE__SYSTEM_CONFIGURATION], [1], |
4570
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
22 [Define to 1 if you have the external variable, |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
23 _system_configuration with a member named physmem.]) |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
24 fi |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
25 ] |
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 |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 AC_DEFUN([gl_PHYSMEM], |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 [ |
5721
abd018cd6020
Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5611
diff
changeset
|
30 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
|
31 |
4570
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
32 # Prerequisites of lib/physmem.c. |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
33 AC_CHECK_HEADERS([sys/pstat.h sys/sysmp.h sys/sysinfo.h \ |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
34 machine/hal_sysinfo.h sys/table.h sys/param.h sys/sysctl.h \ |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
35 sys/systemcfg.h],,, [AC_INCLUDES_DEFAULT]) |
f7d20edaf4d6
(gl_SYS__SYSTEM_CONFIGURATION): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4107
diff
changeset
|
36 |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
9921
diff
changeset
|
37 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
|
38 AC_REQUIRE([gl_SYS__SYSTEM_CONFIGURATION]) |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
39 ]) |