[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: detect IRIX m4
From: |
Eric Blake |
Subject: |
Re: detect IRIX m4 |
Date: |
Wed, 17 Oct 2007 23:11:34 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Eric Blake <ebb9 <at> byu.net> writes:
> In response to:
>
> http://lists.gnu.org/archive/html/bug-autoconf/2007-09/msg00028.html
And in response to:
http://www.nabble.com/forum/ViewPost.jtp?post=13264281&framed=y
From: Eric Blake <address@hidden>
Date: Wed, 17 Oct 2007 17:09:14 -0600
Subject: [PATCH] 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 <address@hidden>
---
ChangeLog | 5 +++++
configure | 10 +++++++---
m4/m4.m4 | 12 ++++++++----
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 81b0f78..7e46203 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2007-10-17 Eric Blake <address@hidden>
+ 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@&address@hidden, m4@&address@hidden)
(m4@&t_max and m4@&t_min): New tests.
diff --git a/configure b/configure
index ceddf50..9e76d0f 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(<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
diff --git a/m4/m4.m4 b/m4/m4.m4
index 711bd58..25cc7fa 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(<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
--
1.5.3.2