+2001-10-09 Akim Demaille <akim@epita.fr>
+
+ 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 <akim@epita.fr>
* m4/cond.m4 (AM_CONDITIONAL): Don't use m4_match as Autoconf
# -----------------
# 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
. $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])"
$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
diff wanted got || exit 1
exit 0
-