+1999-11-13 Akim Demaille <akim@epita.fr>
+
+ Check that the AC_DEFINEs from acspecific.m4 do have a template.
+ Fix the discovered bugs.
+
+ * tests/atgeneral.m4 (AT_CHECK): Don't just exit 1 when you want
+ to propagate the failure of a test: exit with the same exit
+ status, at least to preserve 77 (=ignore).
+ * tests/syntax.m4 (TEST_MACRO): Run also autoheader. Don't run
+ this test on all the macros, some just cannot run without
+ arguments.
+ * acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): In the if egrep/fi for
+ #define templates, add a `:' to prevent syntax errors in
+ config.status when there are no AC_DEFINE performed.
+ * autoheader.m4 (AH_TEMPLATE): Don't use _AC_SH_QUOTE here, use it
+ in...
+ (AH_VERBATIM): here. Now AH_C_UNSIGNED_CHAR is no longer failing
+ (formerly it would produce a non backslashed backquote, which
+ made sh choke).
+
1999-11-13 Akim Demaille <akim@epita.fr>
Introduce a means to distinguish failures of `configure' due to
# -*- autoconf -*-
-dnl AT_AUTOCONF_TEST(NAME-OF-THE-MACRO)
-dnl -----------------------------------
+dnl AT_TEST_MACRO(NAME-OF-THE-MACRO)
+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(TEST_MACRO,
+AT_DEFINE(AT_TEST_MACRO,
[AT_SETUP($1)
# An extremely simple configure.in
AT_DATA(configure.in,
[AC_INIT
+AC_CONFIG_HEADER(config.h)
$1
AC_OUTPUT
])
# The problem is that currently some warnings are spread on several
# lines, so grepping -v warning is not enough.
AT_CHECK([../autoconf -m ..], 0,, ignore)
+AT_CHECK([../autoheader -m ..], 0,, ignore)
AT_CHECK([./configure], 0, ignore, ignore)
-AT_CLEANUP(configure config.status config.log config.cache)])
+AT_CLEANUP(configure config.status config.log config.cache config.h.in config.h)dnl
+])dnl AT_TEST_MACRO
+
+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,
+[ifelse([$1], [AC_CHECK_FUNCS],,
+ [$1], [AC_CHECK_HEADERS],,
+ [$1], [AC_CHECK_MEMBER],,
+ [$1], [AC_CHECK_MEMBERS],,
+ [$1], [AC_CHECK_PROGS],,
+ [$1], [AC_CONFIG_AUX_DIR],,
+ [$1], [AC_CONFIG_AUX_DIRS],,
+ [$1], [AC_INIT],,
+ [$1], [AC_LINKER_OPTION],,
+ [$1], [AC_LINK_FILES],,
+ [$1], [AC_LIST_MEMBER_OF],,
+ [$1], [AC_PATH_PROGS],,
+ [$1], [AC_REPLACE_FUNCS],,
+ [$1], [AC_SEARCH_LIBS],,
+ [AT_TEST_MACRO([$1])])])
echo
-echo 'Syntax of specific macros.'
+echo 'Syntax of macros and completeness of the header templates.'
echo
AT_INCLUDE(macros.m4)