* acgeneral.m4 (AH_VERBATIM, AH_TEMPLATE): New, use AS_ESCAPE, not

_AS_QUOTE.
(_AH_VERBATIM_OLD, _AH_TEMPLATE_OLD): New, used for bugward
compatibility in...
(AC_DEFINE, AC_DEFINE_UNQUOTED): here.
This commit is contained in:
Akim Demaille 2001-02-26 21:37:13 +00:00
parent 760abff068
commit 8376b27448
3 changed files with 48 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2001-02-26 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AH_VERBATIM, AH_TEMPLATE): New, use AS_ESCAPE, not
_AS_QUOTE.
(_AH_VERBATIM_OLD, _AH_TEMPLATE_OLD): New, used for bugward
compatibility in...
(AC_DEFINE, AC_DEFINE_UNQUOTED): here.
2001-02-26 Pavel Roskin <proski@gnu.org>
* autoupdate.in (&mktmpdir): Strip the newline from the output

View File

@ -283,6 +283,15 @@ m4_define([AH_OUTPUT], [])
# TEMPLATE associated to the KEY. Otherwise, do nothing. TEMPLATE is
# output as is, with no formating.
m4_define([AH_VERBATIM],
[AS_LITERAL_IF([$1],
[AH_OUTPUT([$1], AS_ESCAPE([[$2]]))])
])
# _AH_VERBATIM_OLD(KEY, TEMPLATE)
# -------------------------------
# Same as above, but with bugward compatibility.
m4_define([_AH_VERBATIM_OLD],
[AS_LITERAL_IF([$1],
[AH_OUTPUT([$1], _AS_QUOTE([[$2]]))])
])
@ -298,6 +307,15 @@ m4_define([AH_TEMPLATE],
#undef $1])])
# _AH_TEMPLATE_OLD(KEY, DESCRIPTION)
# ----------------------------------
# Same as above, but with bugward compatibility.
m4_define([_AH_TEMPLATE_OLD],
[_AH_VERBATIM_OLD([$1],
m4_text_wrap([$2 */], [ ], [/* ])[
#undef $1])])
# AH_TOP(TEXT)
# ------------
# Output TEXT at the top of `config.h.in'.
@ -2045,7 +2063,7 @@ m4_define([AC_DEFINE_TRACE],
# die. The third argument is used by autoheader.
m4_define([AC_DEFINE],
[AC_DEFINE_TRACE([$1])dnl
m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
cat >>confdefs.h <<\EOF
[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
EOF
@ -2057,7 +2075,7 @@ EOF
# Similar, but perform shell substitutions $ ` \ once on VALUE.
m4_define([AC_DEFINE_UNQUOTED],
[AC_DEFINE_TRACE([$1])dnl
m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
cat >>confdefs.h <<EOF
[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
EOF

View File

@ -283,6 +283,15 @@ m4_define([AH_OUTPUT], [])
# TEMPLATE associated to the KEY. Otherwise, do nothing. TEMPLATE is
# output as is, with no formating.
m4_define([AH_VERBATIM],
[AS_LITERAL_IF([$1],
[AH_OUTPUT([$1], AS_ESCAPE([[$2]]))])
])
# _AH_VERBATIM_OLD(KEY, TEMPLATE)
# -------------------------------
# Same as above, but with bugward compatibility.
m4_define([_AH_VERBATIM_OLD],
[AS_LITERAL_IF([$1],
[AH_OUTPUT([$1], _AS_QUOTE([[$2]]))])
])
@ -298,6 +307,15 @@ m4_define([AH_TEMPLATE],
#undef $1])])
# _AH_TEMPLATE_OLD(KEY, DESCRIPTION)
# ----------------------------------
# Same as above, but with bugward compatibility.
m4_define([_AH_TEMPLATE_OLD],
[_AH_VERBATIM_OLD([$1],
m4_text_wrap([$2 */], [ ], [/* ])[
#undef $1])])
# AH_TOP(TEXT)
# ------------
# Output TEXT at the top of `config.h.in'.
@ -2045,7 +2063,7 @@ m4_define([AC_DEFINE_TRACE],
# die. The third argument is used by autoheader.
m4_define([AC_DEFINE],
[AC_DEFINE_TRACE([$1])dnl
m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
cat >>confdefs.h <<\EOF
[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
EOF
@ -2057,7 +2075,7 @@ EOF
# Similar, but perform shell substitutions $ ` \ once on VALUE.
m4_define([AC_DEFINE_UNQUOTED],
[AC_DEFINE_TRACE([$1])dnl
m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
cat >>confdefs.h <<EOF
[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
EOF