From: Eric Blake Date: Wed, 17 Oct 2007 23:09:14 +0000 (-0600) Subject: Reject FreeBSD m4. X-Git-Tag: v2.62~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e9a252f354c489bcb5d0e6100dd6208712229b9;p=thirdparty%2Fautoconf.git Reject FreeBSD m4. * m4/m4.m4 (AC_PROG_GNU_M4): Also check for frozen file support. * configure: Regenerate. Reported by Bob Friesenhahn. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 81b0f785..7e462036 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-10-17 Eric Blake + 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. diff --git a/configure b/configure index ceddf50e..9e76d0fc 100755 --- 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(,mac,bug)d'nl - test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \ + test -z "`$ac_path_M4 -F conftest.m4f &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 diff --git a/m4/m4.m4 b/m4/m4.m4 index 711bd58a..25cc7fa7 100644 --- 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(,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 &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