]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Reject FreeBSD m4.
authorEric Blake <ebb9@byu.net>
Wed, 17 Oct 2007 23:09:14 +0000 (17:09 -0600)
committerEric Blake <ebb9@byu.net>
Wed, 17 Oct 2007 23:09:14 +0000 (17:09 -0600)
* m4/m4.m4 (AC_PROG_GNU_M4): Also check for frozen file support.
* configure: Regenerate.
Reported by Bob Friesenhahn.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
configure
m4/m4.m4

index 81b0f785436b4c8891491010eeeb08288fba9182..7e462036974590b6492e13a1c52ac00fefb321bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-10-17  Eric Blake  <ebb9@byu.net>
 
+       Reject FreeBSD m4.
+       * m4/m4.m4 (AC_PROG_GNU_M4): Also check for frozen file support.
+       * configure: Regenerate.
+       Reported by Bob Friesenhahn.
+
        Test recent additions.
        * tests/m4sugar.at (m4@&t@_map, m4@&t@_combine)
        (m4@&t_max and m4@&t_min): New tests.
index ceddf50e170510048221469dfb6ee19df4d1c410..9e76d0fc9aaee892fe3b949f5401a764c660bd48 100755 (executable)
--- a/configure
+++ b/configure
@@ -2351,7 +2351,8 @@ $as_echo_n "checking for GNU M4 that supports accurate traces... " >&6; }
 if test "${ac_cv_path_M4+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -z "$M4"; then
+  rm -f conftest.m4f
+if test -z "$M4"; then
   ac_path_M4_found=false
   # Loop through the user's path and test for each of PROGNAME-LIST
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2363,10 +2364,13 @@ do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_M4="$as_dir/$ac_prog$ac_exec_ext"
       { test -f "$ac_path_M4" && $as_test_x "$ac_path_M4"; } || continue
-      # Root out GNU M4 1.4.4, as well as non-GNU m4 that ignore --trace.
+      # Root out GNU M4 1.4.4, as well as non-GNU m4 that ignore -t, -F.
       ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)d'nl
-      test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \
+      test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \
+      && test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \
+      && test -f conftest.m4f \
       && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:
+      rm -f conftest.m4f
       $ac_path_M4_found && break 3
     done
   done
index 711bd58a4d68ca7edb7cf60eae89ff69f378ed14..25cc7fa742af465aa491ae4e7e5bb3ff2465c90e 100644 (file)
--- a/m4/m4.m4
+++ b/m4/m4.m4
@@ -15,12 +15,16 @@ AC_DEFUN([AC_PROG_GNU_M4],
   [AC_ARG_VAR([M4], [Location of GNU M4 1.4.5 or later.  Defaults to the first
     program of `m4', `gm4', or `gnum4' on PATH that meets Autoconf needs.])
   AC_CACHE_CHECK([for GNU M4 that supports accurate traces], [ac_cv_path_M4],
-    [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4 gnum4],
+    [rm -f conftest.m4f
+AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4 gnum4],
       [dnl Creative quoting here to avoid raw dnl and ifdef in configure.
-      # Root out GNU M4 1.4.4, as well as non-GNU m4 that ignore --trace.
+      # Root out GNU M4 1.4.4, as well as non-GNU m4 that ignore -t, -F.
       ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)d'nl
-      test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \
-      && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:],
+      test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \
+      && test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \
+      && test -f conftest.m4f \
+      && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:
+      rm -f conftest.m4f],
       [AC_MSG_ERROR([no acceptable m4 could be found in \$PATH.
 GNU M4 1.4.5 or later is required; 1.4.8 is recommended])])])
   M4=$ac_cv_path_M4