summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-10-07 14:15:00 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-10-07 14:15:00 -0700
commitd47439a333a33e01ba4b6695e588fd4ded4fc611 (patch)
tree07654f9076555ea27cd827fc2de1f1524a7ea16b /m4
parent84e8e185cdabbe547cb2b724c2ca1014a73efcfc (diff)
downloademacs-d47439a333a33e01ba4b6695e588fd4ded4fc611.tar.gz
Merge from gnulib, fixing some 'configure' typos (Bug#9696).
* lib/signal.in.h, lib/sigprocmask.c, m4/gl-comp.m4: * m4/gnulib-common.m4: Merge from gnulib. Without this, 'configure' would say "func_gl_gnulib_m4code_pathmax: command not found" on powerpc-apple-darwin9.8.0.
Diffstat (limited to 'm4')
-rw-r--r--m4/gl-comp.m423
-rw-r--r--m4/gnulib-common.m425
2 files changed, 28 insertions, 20 deletions
diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4
index 04234bb6ef3..03cedf70af8 100644
--- a/m4/gl-comp.m4
+++ b/m4/gl-comp.m4
@@ -79,9 +79,9 @@ AC_DEFUN([gl_EARLY],
# Code from module stdarg:
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
- dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC
+ dnl gl_PROG_CC_C99 arranges for this. With older Autoconf gl_PROG_CC_C99
dnl shouldn't hurt, though installers are on their own to set c99 mode.
- AC_REQUIRE([AC_PROG_CC_STDC])
+ gl_PROG_CC_C99
# Code from module stdbool:
# Code from module stddef:
# Code from module stdint:
@@ -246,12 +246,6 @@ if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
fi
gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
gl_gnulib_enabled_sigprocmask=true
- if $condition; then
- func_gl_gnulib_m4code_raise
- fi
- if $condition; then
- func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616
- fi
fi
}
func_gl_gnulib_m4code_stat ()
@@ -264,13 +258,10 @@ if test $REPLACE_STAT = 1; then
fi
gl_SYS_STAT_MODULE_INDICATOR([stat])
gl_gnulib_enabled_stat=true
- if $condition; then
+ if test $REPLACE_STAT = 1; then
func_gl_gnulib_m4code_dosname
fi
- if $condition; then
- func_gl_gnulib_m4code_pathmax
- fi
- if $condition; then
+ if test $REPLACE_STAT = 1; then
func_gl_gnulib_m4code_verify
fi
fi
@@ -305,12 +296,6 @@ gl_STDLIB_MODULE_INDICATOR([strtoull])
gl_gnulib_enabled_verify=true
fi
}
- if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
- func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616
- fi
- if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
- func_gl_gnulib_m4code_676220fa4366efa9bdbfccf11a857c07
- fi
if test $REPLACE_GETOPT = 1; then
func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
fi
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 8fc448fdc8f..7d832999591 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 30
+# gnulib-common.m4 serial 31
dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -211,6 +211,29 @@ m4_ifndef([AS_VAR_IF],
[m4_define([AS_VAR_IF],
[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
+# gl_PROG_CC_C99
+# Modifies the value of the shell variable CC in an attempt to make $CC
+# understand ISO C99 source code.
+# This is like AC_PROG_CC_C99, except that
+# - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60,
+# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC
+# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00367.html>,
+# but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99
+# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00441.html>.
+# Remaining problems:
+# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
+# to CC twice
+# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>.
+# - AC_PROG_CC_STDC is likely to change when C1X is an ISO standard.
+AC_DEFUN([gl_PROG_CC_C99],
+[
+ dnl Change that version number to the minimum Autoconf version that supports
+ dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls.
+ m4_version_prereq([9.0],
+ [AC_REQUIRE([AC_PROG_CC_C99])],
+ [AC_REQUIRE([AC_PROG_CC_STDC])])
+])
+
# gl_PROG_AR_RANLIB
# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler.
# The user can set the variables AR, ARFLAGS, RANLIB if he wants to override