AC_PROG_MKDIR_P: port workaround to pre-2.62 Autoconf
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 21 Dec 2012 16:12:48 +0000 (08:12 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 21 Dec 2012 16:13:30 +0000 (08:13 -0800)
* m4/gnulib-common.m4 (AC_PROG_MKDIR_P, AC_C_RESTRICT):
Use m4_ifndef([AC_AUTOCONF_VERSION], ...), not
m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]),[2.62]),[-1],
...), as the latter is fatal with older Autoconfs.
Problewm reported by Eric Blake in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00097.html>.

ChangeLog
m4/gnulib-common.m4

index 62b6e51..6f716b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-12-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+       AC_PROG_MKDIR_P: port workaround to pre-2.62 Autoconf
+       * m4/gnulib-common.m4 (AC_PROG_MKDIR_P, AC_C_RESTRICT):
+       Use m4_ifndef([AC_AUTOCONF_VERSION], ...), not
+       m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]),[2.62]),[-1],
+       ...), as the latter is fatal with older Autoconfs.
+       Problewm reported by Eric Blake in
+       <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00097.html>.
+
 2012-12-20  Paul Eggert  <eggert@cs.ucla.edu>
 
        AC_PROG_MKDIR_P: don't workaround if not buggy
index 01796bd..f3ba8d5 100644 (file)
@@ -294,7 +294,8 @@ Amsterdam
 # for interoperability with automake-1.9.6 from autoconf-2.62.
 # Remove this macro when we can assume autoconf >= 2.62 or
 # autoconf >= 2.60 && automake >= 1.10.
-m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]),[2.62]),[-1],[
+# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
+m4_ifndef([AC_AUTOCONF_VERSION],[
 m4_ifdef([AC_PROG_MKDIR_P], [
   dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed.
   m4_define([AC_PROG_MKDIR_P],
@@ -312,7 +313,8 @@ m4_ifdef([AC_PROG_MKDIR_P], [
 # so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
 # works.
 # This definition can be removed once autoconf >= 2.62 can be assumed.
-m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]),[2.62]),[-1],[
+# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
+m4_ifndef([AC_AUTOCONF_VERSION],[
 AC_DEFUN([AC_C_RESTRICT],
 [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
   [ac_cv_c_restrict=no