From: Akim Demaille Date: Thu, 4 May 2000 10:26:02 +0000 (+0000) Subject: * acgeneral.m4 (AH_TOP, AH_BOTTOM): New macros. X-Git-Tag: autoconf-2.50~948 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fce102c8c92145c6fa4c2ab271c4de5a4abce6bb;p=thirdparty%2Fautoconf.git * acgeneral.m4 (AH_TOP, AH_BOTTOM): New macros. (_AH_COUNTER): New variable. * tests/tools.m4 (autoheader): Check their proper functioning. --- diff --git a/ChangeLog b/ChangeLog index 062163e48..e4db3860c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-05-04 Akim Demaille + + * acgeneral.m4 (AH_TOP, AH_BOTTOM): New macros. + (_AH_COUNTER): New variable. + * tests/tools.m4 (autoheader): Check their proper functioning. + 2000-05-04 Akim Demaille * doc/autoconf.texi (Obsolete Macros): Rename as... diff --git a/acgeneral.m4 b/acgeneral.m4 index 56affd35b..d40da6ee0 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -379,8 +379,8 @@ AU_DEFINE([$1], [$2], [$3])dnl ## ------------------------- ## -# AH_OUTPUT(TEXT) -# --------------- +# AH_OUTPUT(KEY, TEXT) +# -------------------- # Pass TEXT to autoheader. # This macro is `read' only via `autoconf --trace', it outputs nothing. define([AH_OUTPUT], []) @@ -408,6 +408,24 @@ define([AH_TEMPLATE], #undef $1])]) +# AH_TOP(TEXT) +# ------------ +# Output TEXT at the top of `config.h.in'. +define([AH_TOP], +[m4_define([_AH_COUNTER], incr(_AH_COUNTER))dnl +AH_VERBATIM([0000]_AH_COUNTER, [$1])]) + + +# AH_BOTTOM(TEXT) +# --------------- +# Output TEXT at the bottom of `config.h.in'. +define([AH_BOTTOM], +[m4_define([_AH_COUNTER], incr(_AH_COUNTER))dnl +AH_VERBATIM([zzzz]_AH_COUNTER, [$1])]) + +# Initialize. +define([_AH_COUNTER], [0]) + ## --------------------- ## ## Some /bin/sh idioms. ## diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 56affd35b..d40da6ee0 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -379,8 +379,8 @@ AU_DEFINE([$1], [$2], [$3])dnl ## ------------------------- ## -# AH_OUTPUT(TEXT) -# --------------- +# AH_OUTPUT(KEY, TEXT) +# -------------------- # Pass TEXT to autoheader. # This macro is `read' only via `autoconf --trace', it outputs nothing. define([AH_OUTPUT], []) @@ -408,6 +408,24 @@ define([AH_TEMPLATE], #undef $1])]) +# AH_TOP(TEXT) +# ------------ +# Output TEXT at the top of `config.h.in'. +define([AH_TOP], +[m4_define([_AH_COUNTER], incr(_AH_COUNTER))dnl +AH_VERBATIM([0000]_AH_COUNTER, [$1])]) + + +# AH_BOTTOM(TEXT) +# --------------- +# Output TEXT at the bottom of `config.h.in'. +define([AH_BOTTOM], +[m4_define([_AH_COUNTER], incr(_AH_COUNTER))dnl +AH_VERBATIM([zzzz]_AH_COUNTER, [$1])]) + +# Initialize. +define([_AH_COUNTER], [0]) + ## --------------------- ## ## Some /bin/sh idioms. ## diff --git a/tests/tools.m4 b/tests/tools.m4 index 2224dbd08..320e4042c 100644 --- a/tests/tools.m4 +++ b/tests/tools.m4 @@ -82,6 +82,7 @@ AT_DATA(acconfig.h, #undef this ]]) + # 1. Check that `acconfig.h' is still honored. AT_DATA(configure.in, [[AC_INIT @@ -89,13 +90,13 @@ AC_CONFIG_HEADERS(config.h) AC_DEFINE(this, "whatever you want.") ]]) - AT_CHECK([../autoheader -m .. -