Autoconf testing.
* tests/suite.m4 (AT_TEST_MACRO): Moved to
* tests/atspecific.m4 (AT_TEST_MACRO): here.
* tests/syntax.m4 (TEST_MACRO): Moved to
* tests/atspecific.m4 (TEST_MACRO): here. Don't test /^AC_INIT/,
nor /^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$/: they are already
tried elsewhere.
* tests/Makefile.am: Adjusted.
+2000-02-07 Akim Demaille <akim@epita.fr>
+
+ * tests/atspecific.m4: New file, for AT macros specific to
+ Autoconf testing.
+ * tests/suite.m4 (AT_TEST_MACRO): Moved to
+ * tests/atspecific.m4 (AT_TEST_MACRO): here.
+ * tests/syntax.m4 (TEST_MACRO): Moved to
+ * tests/atspecific.m4 (TEST_MACRO): here. Don't test /^AC_INIT/,
+ nor /^AC_PROG_\(CC\|CXX\|F77\)_\(GNU\|WORKS\)$/: they are already
+ tried elsewhere.
+ * tests/Makefile.am: Adjusted.
+
2000-02-07 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (m4_case): Fixed a typo and a bug: one shift was
# We don't actually distribute the testsuite, since one only
# needs m4 to build it, m4 being required anyway to install Autoconf.
-EXTRA_DIST = atgeneral.m4 suite.m4 macros.m4 actest.m4 $(SUITE)
+EXTRA_DIST = atgeneral.m4 atspecific.m4 suite.m4 macros.m4 actest.m4 $(SUITE)
PERL = perl
check-local: atconfig testsuite
$(SHELL) testsuite
-testsuite: atgeneral.m4 suite.m4 macros.m4 $(SUITE)
- m4 -I $(srcdir) atgeneral.m4 suite.m4 | cat -s > $@-tmp
+testsuite: atgeneral.m4 atspecific.m4 suite.m4 macros.m4 $(SUITE)
+ m4 -I $(srcdir) atspecific.m4 suite.m4 | cat -s > $@-tmp
chmod +x $@-tmp
mv $@-tmp $@
macros are supposed to test (e.g., a Fortran compiler).
EOF
-dnl AT_TEST_MACRO(NAME-OF-THE-MACRO, [MACRO-USE], [ADDITIONAL-CMDS])
-dnl ----------------------------------------------------------------
-dnl Create a minimalist configure.in running the macro named
-dnl NAME-OF-THE-MACRO, check that autoconf runs on that script,
-dnl and that the shell runs correctly the configure.
-AT_DEFINE(AT_TEST_MACRO,
-[AT_SETUP([$1])
-
-dnl Produce the configure.in
-AT_DATA(configure.in,
-[AC_INCLUDE(actest.m4)
-AC_INIT
-AC_CONFIG_HEADER(config.h)
-AC_ENV_SAVE(expout)
-ifelse([$2],,[$1], [$2])
-AC_ENV_SAVE(env-after)
-AC_OUTPUT
-])
-
-dnl FIXME: Here we just don't consider the stderr from Autoconf.
-dnl Maybe some day we could be more precise and filter out warnings.
-dnl The problem is that currently some warnings are spread on several
-dnl lines, so grepping -v warning is not enough.
-AT_CHECK([../autoconf -m .. -l $at_srcdir], 0,, ignore)
-AT_CHECK([../autoheader -m .. -l $at_srcdir], 0,, ignore)
-AT_CHECK([./configure], 0, ignore, ignore)
-AT_CHECK([cat env-after], 0, expout)
-$3
-AT_CLEANUP(configure config.status config.log config.cache config.h.in config.h env-after)dnl
-])dnl AT_TEST_MACRO
-
-
dnl Run semantics before, since there are little chances that syntax
dnl fails.
# -*- autoconf -*-
-dnl TEST_MACRO(NAME-OF-THE-MACRO)
-dnl -----------------------------
-dnl Run AT_TEST_MACRO(NAME-OF-THE-MACRO) on selected macros only.
-dnl There are macros which require argument. We cannot run them without.
-dnl FIXME: AC_INIT creates an infinite loop in m4 when called twice.
-dnl I inserted the exception here, not in Makefile.am, because it seems
-dnl better to me. I did not use m4_case, since libm4 is not ready yet.
-AT_DEFINE(TEST_MACRO,
-[AT_CASE([$1],
- [AC_ARG_VAR],,
- [AC_CHECK_FUNCS],,
- [AC_CHECK_HEADERS],,
- [AC_CHECK_MEMBER],,
- [AC_CHECK_MEMBERS],,
- [AC_CHECK_PROGS],,
- [AC_CONFIG_AUX_DIR],,
- [AC_CONFIG_AUX_DIRS],,
- [AC_INIT],,
- [AC_INIT_PARSE_ARGS],,
- [AC_LINKER_OPTION],,
- [AC_LINK_FILES],,
- [AC_LIST_MEMBER_OF],,
- [AC_PATH_PROGS],,
- [AC_REPLACE_FUNCS],,
- [AC_SEARCH_LIBS],,
-
- [AT_TEST_MACRO([$1])])])
-
cat <<EOF
Syntax of macros and completeness of the header templates.