+2000-03-10 Akim Demaille <akim@epita.fr>
+
+ Multiple `-e' to egrep are not portable. On IRIX 6.5 and Solaris
+ 2.5.1 only the last one is honored:
+ > echo "foo\nbar" | egrep -e 'foo' -e 'bar'
+ bar
+ > echo "foo\nbar" | egrep -e 'bar' -e 'foo'
+ foo
+ Reported by Nicolas Joly.
+ An alternative would have to use `sed', unfortunately alternation
+ is not portable.
+
+ * tests/actest.m4 (join): New macro.
+ (AC_ENV_SAVE): Join the egrep patterns into a single big one.
+ * tests/Makefile.am (EGREP_EXCLUDE): Rename as FILTER_MACROS.
+ Join the egrep patterns into a single big one.
+
2000-03-10 Jim Meyering <meyering@lucent.com>
* acgeneral.m4 (_AC_CHECK_TOOL_PREFIX): Correct typos in definition:
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AT_TESTPATH = @AT_TESTPATH@
AWK = @AWK@
HELP2MAN = @HELP2MAN@
M4 = @M4@
-MAKEINFO = @MAKEINFO@
-PACKAGE = @PACKAGE@
PERL = @PERL@
PERLSCRIPTS = @PERLSCRIPTS@
-VERSION = @VERSION@
standards_texi = @standards_texi@
EXTRA_DIST = init.m4 missing.m4 sanity.m4 atconfig.m4
DIST_COMMON = Makefile.am Makefile.in
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AT_TESTPATH = @AT_TESTPATH@
AWK = @AWK@
HELP2MAN = @HELP2MAN@
M4 = @M4@
-MAKEINFO = @MAKEINFO@
-PACKAGE = @PACKAGE@
PERL = @PERL@
PERLSCRIPTS = @PERLSCRIPTS@
-VERSION = @VERSION@
standards_texi = @standards_texi@
man_MANS = autoconf.1 autoreconf.1 autoheader.1 autoupdate.1 ifnames.1 autoscan.1
DIST_COMMON = Makefile.am Makefile.in
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
-# EGREP_EXCLUDE
+# FILTER_MACROS
# -------------
# The test `syntax.m4' tries to run all the macros of Autoconf to check
# for syntax problems, etc. Not all the macros can be run without argument,
# Used in many places.
# - _AC_
# Internal macros are used elsewhere.
-EGREP_EXCLUDE = egrep -v \
- -e '^AC_ARG_VAR$$' \
- -e '^AC_CHECK_(DECL|FILE|FUNC|HEADER|MEMBER|PROG|SIZEOF|TYPE)S?$$' \
- -e '^AC_CONFIG' \
- -e '^AC_INIT' \
- -e '^AC_LINKER_OPTION$$' \
- -e '^AC_LINK_FILES$$' \
- -e '^AC_LIST_MEMBER_OF$$' \
- -e '^AC_PATH_(TOOL|PROG)S?$$' \
- -e '^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$' \
- -e '^AC_REPLACE_FUNCS$$' \
- -e '^AC_SEARCH_LIBS$$' \
- -e '^AC_TRY' \
- -e '_AC_'
+#
+# Multiple `-e' to egrep are not portable, so join all the patterns together.
+# We use the fact that automake will replace all the `\\\n' with ` '.
+FILTER_MACROS = egrep -v -e \
+`echo '^AC_ARG_VAR$$\
+^AC_CHECK_(DECL|FILE|FUNC|HEADER|MEMBER|PROG|SIZEOF|TYPE)S?$$\
+^AC_CONFIG\
+^AC_INIT\
+^AC_LINKER_OPTION$$\
+^AC_LINK_FILES$$\
+^AC_LIST_MEMBER_OF$$\
+^AC_PATH_(TOOL|PROG)S?$$\
+^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$\
+^AC_REPLACE_FUNCS$$\
+^AC_SEARCH_LIBS$$\
+^AC_TRY\
+_AC_' | tr ' ' '|'`
macros.m4: $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 $(srcdir)/Makefile.am
cat $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 | \
sed -ne 's/^A[CU]_DEFUN(\[*\([a-zA-Z0-9_]*\).*$$/\1/p' | \
- sort | uniq | $(EGREP_EXCLUDE) >defuns
+ sort | uniq | $(FILTER_MACROS) >defuns
# Get the list of macros that are required: there is little interest
# in testing them since they will be run but the guy who requires
# them.
PERL = perl
-# EGREP_EXCLUDE
+# FILTER_MACROS
# -------------
# The test `syntax.m4' tries to run all the macros of Autoconf to check
# for syntax problems, etc. Not all the macros can be run without argument,
# Used in many places.
# - _AC_
# Internal macros are used elsewhere.
-EGREP_EXCLUDE = egrep -v -e '^AC_ARG_VAR$$' -e '^AC_CHECK_(DECL|FILE|FUNC|HEADER|MEMBER|PROG|SIZEOF|TYPE)S?$$' -e '^AC_CONFIG' -e '^AC_INIT' -e '^AC_LINKER_OPTION$$' -e '^AC_LINK_FILES$$' -e '^AC_LIST_MEMBER_OF$$' -e '^AC_PATH_(TOOL|PROG)S?$$' -e '^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$' -e '^AC_REPLACE_FUNCS$$' -e '^AC_SEARCH_LIBS$$' -e '^AC_TRY' -e '_AC_'
+#
+# Multiple `-e' to egrep are not portable, so join all the patterns together.
+# We use the fact that automake will replace all the `\\\n' with ` '.
+FILTER_MACROS = egrep -v -e `echo '^AC_ARG_VAR$$ ^AC_CHECK_(DECL|FILE|FUNC|HEADER|MEMBER|PROG|SIZEOF|TYPE)S?$$ ^AC_CONFIG ^AC_INIT ^AC_LINKER_OPTION$$ ^AC_LINK_FILES$$ ^AC_LIST_MEMBER_OF$$ ^AC_PATH_(TOOL|PROG)S?$$ ^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$ ^AC_REPLACE_FUNCS$$ ^AC_SEARCH_LIBS$$ ^AC_TRY _AC_' | tr ' ' '|'`
CLEANFILES = debug-*.sh macro configure configure.in config.status config.cache config.log config.h.in config.h
DISTCLEANFILES = atconfig testsuite
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES = atconfig
-DIST_COMMON = Makefile.am Makefile.in atconfig.in
+DIST_COMMON = Makefile.am Makefile.in atconfig.in configure \
+configure.in
PACKAGE = @PACKAGE@
macros.m4: $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 $(srcdir)/Makefile.am
cat $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 | \
sed -ne 's/^A[CU]_DEFUN(\[*\([a-zA-Z0-9_]*\).*$$/\1/p' | \
- sort | uniq | $(EGREP_EXCLUDE) >defuns
+ sort | uniq | $(FILTER_MACROS) >defuns
# Get the list of macros that are required: there is little interest
# in testing them since they will be run but the guy who requires
# them.
dnl actest.m4 -*- autoconf -*-
dnl Additional Autoconf macros to ease testing.
+# join(SEP, ARG1, ARG2...)
+# ------------------------
+# Produce ARG1SEPARG2...SEPARGn.
+define(join,
+[ifelse([$#], [1], [],
+ [$#], [2], [[$2]],
+ [[$2][$1]join([$1], m4_shift(m4_shift($@)))])])
+
# AC_ENV_SAVE(FILE)
# ------------------
AC_DEFUN(AC_ENV_SAVE,
[(set) 2>&1 |
- egrep -v \
- -e '^ac_' \
- -e '^(CC|CFLAGS|CPP|GCC|CXX|CXXFLAGS|CXXCPP|GXX|F77|FFLAGS|FLIBS|G77)=' \
- -e '^(LIBS|LIBOBJS|LDFLAGS)=' \
- -e '^INSTALL(_(DATA|PROGRAM|SCRIPT))?=' \
- -e '^(CYGWIN|ISC|MINGW32|MINIX|EMXOS2|EXEEXT|OBJEXT)=' \
- -e '^(X_(CFLAGS|(EXTRA_|PRE_)?LIBS)|x_(includes|libraries)|have_x)=' \
- -e '^(host|build|target)(_(alias|cpu|vendor|os))?=' \
- -e '^(cross_compiling)=' \
- -e '^(interpval)=' \
- -e '^(f77_(case|underscore))=' \
- -e '^(ALLOCA|NEED_SETGID|KMEM_GROUP)=' \
- -e '^(AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|RANLIB|SET_MAKE|YACC)=' \
- -e '^(_|OLDPWD|PIPESTATUS|SECONDS)=' |
+ egrep -v -e \
+'join([|],
+ [^ac_],
+ [^(CC|CFLAGS|CPP|GCC|CXX|CXXFLAGS|CXXCPP|GXX|F77|FFLAGS|FLIBS|G77)=],
+ [^(LIBS|LIBOBJS|LDFLAGS)=],
+ [^INSTALL(_(DATA|PROGRAM|SCRIPT))?=],
+ [^(CYGWIN|ISC|MINGW32|MINIX|EMXOS2|EXEEXT|OBJEXT)=],
+ [^(X_(CFLAGS|(EXTRA_|PRE_)?LIBS)|x_(includes|libraries)|have_x)=],
+ [^(host|build|target)(_(alias|cpu|vendor|os))?=],
+ [^(cross_compiling)=],
+ [^(interpval)=],
+ [^(f77_(case|underscore))=],
+ [^(ALLOCA|NEED_SETGID|KMEM_GROUP)=],
+ [^(AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|RANLIB|SET_MAKE|YACC)=],
+ [^(_|OLDPWD|PIPESTATUS|SECONDS)=])' |
# There maybe variables spread on several lines, eg IFS, remove the dead
# lines
fgrep = >$1