From 71efb9a49a79c807e4fbacbc3ba26cc63d5f9f64 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 10 Oct 2001 13:05:13 +0000 Subject: [PATCH] Do not use Autoconf internals. * tests/dirname.test: Don't use AC_PLAIN_SCRIPT. * m4/header.m4 (_AM_DIRNAME): Use regexp and patsubst, not m4_regexp and m4_patsubst, since the latter are reserved for ERE macro in GNU M4 1.5. --- ChangeLog | 9 +++++++++ m4/header.m4 | 12 ++++++------ tests/dirname.test | 10 +++------- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 209cc89d..cf0d5d9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-10-09 Akim Demaille + + Do not use Autoconf internals. + + * tests/dirname.test: Don't use AC_PLAIN_SCRIPT. + * m4/header.m4 (_AM_DIRNAME): Use regexp and patsubst, not + m4_regexp and m4_patsubst, since the latter are reserved for ERE + macro in GNU M4 1.5. + 2001-10-08 Akim Demaille * m4/cond.m4 (AM_CONDITIONAL): Don't use m4_match as Autoconf diff --git a/m4/header.m4 b/m4/header.m4 index a29f0d95..c79672ee 100644 --- a/m4/header.m4 +++ b/m4/header.m4 @@ -47,11 +47,11 @@ echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_In # ----------------- # Like AS_DIRNAME, only do it during macro expansion AC_DEFUN([_AM_DIRNAME], - [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, - m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1, - m4_if(m4_regexp([$1], [^/.*]), -1, + [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, + m4_if(regexp([$1], [^//\([^/]\|$\)]), -1, + m4_if(regexp([$1], [^/.*]), -1, [.], - m4_patsubst([$1], [^\(/\).*], [\1])), - m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), - m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl + patsubst([$1], [^\(/\).*], [\1])), + patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), + patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl ]) # _AM_DIRNAME diff --git a/tests/dirname.test b/tests/dirname.test index bbc5de7f..79712926 100755 --- a/tests/dirname.test +++ b/tests/dirname.test @@ -5,7 +5,7 @@ . $srcdir/defs || exit 1 cat > configure.in << 'END' -AC_PLAIN_SCRIPT +AC_INIT echo "1 /a/path/to/a/file = _AM_DIRNAME([/a/path/to/a/file])" echo "2 another/path/to/a/file = _AM_DIRNAME([another/path/to/a/file])" echo "3 file = _AM_DIRNAME([file])" @@ -19,11 +19,8 @@ END $needs_autoconf $ACLOCAL || exit 1 -$AUTOCONF || exit 1 - -# fail gracefully if autoconf didn't support AC_PLAIN_SCRIPT, because it won't -# support our regexps anyhow -test -s configure || exit 77 +# fail gracefully if autoconf didn't support support our regexps anyhow +$AUTOCONF || exit 77 $SHELL ./configure >got || exit 1 @@ -40,4 +37,3 @@ EOF diff wanted got || exit 1 exit 0 - -- 2.43.5