diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-02-20 18:18:16 +0000 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-02-23 09:36:36 +0000 |
commit | 407ddbbc953737a6e3f603982a7362dddb2889c9 (patch) | |
tree | 811fea3525a1b502c1f9546e6b258984b8ede0a1 /m4/ax_check_enable_debug.m4 | |
parent | 497ec5d50dac68f94d945d209dd2780d2c97074c (diff) | |
download | autoconf-archive-407ddbbc953737a6e3f603982a7362dddb2889c9.tar.gz |
ax_check_enable_debug: Use $ax_is_release as default for IS-RELEASE
This makes it easier to use AX_IS_RELEASE together with
AX_CHECK_ENABLE_DEBUG.
Now you can do:
AX_IS_RELEASE([git-directory])
AX_CHECK_ENABLE_DEBUG()
instead of:
AX_IS_RELEASE([git-directory])
AX_CHECK_ENABLE_DEBUG(,,,[$ax_is_release])
Diffstat (limited to 'm4/ax_check_enable_debug.m4')
-rw-r--r-- | m4/ax_check_enable_debug.m4 | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/m4/ax_check_enable_debug.m4 b/m4/ax_check_enable_debug.m4 index 147ffd2..f99d75f 100644 --- a/m4/ax_check_enable_debug.m4 +++ b/m4/ax_check_enable_debug.m4 @@ -26,11 +26,12 @@ # Should be invoked prior to any AC_PROG_* compiler checks. # # IS-RELEASE can be used to change the default to 'no' when making a -# release. Set IS-RELEASE to 'yes' or 'no' as appropriate, for example by -# using the AX_IS_RELEASE macro: +# release. Set IS-RELEASE to 'yes' or 'no' as appropriate. By default, it +# uses the value of $ax_is_release, so if you are using the AX_IS_RELEASE +# macro, there is no need to pass this parameter. # # AX_IS_RELEASE([git-directory]) -# AX_CHECK_ENABLE_DEBUG(,,,[$ax_is_release]) +# AX_CHECK_ENABLE_DEBUG() # # LICENSE # @@ -41,7 +42,7 @@ # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. -#serial 4 +#serial 5 AC_DEFUN([AX_CHECK_ENABLE_DEBUG],[ AC_BEFORE([$0],[AC_PROG_CC])dnl @@ -52,9 +53,12 @@ AC_DEFUN([AX_CHECK_ENABLE_DEBUG],[ AC_MSG_CHECKING(whether to enable debugging) ax_enable_debug_default=m4_tolower(m4_normalize(ifelse([$1],,[no],[$1]))) + ax_enable_debug_is_release=m4_tolower(m4_normalize(ifelse([$4],, + [$ax_is_release], + [$4]))) # If this is a release, override the default. - AS_IF([test "$4" = "yes"], + AS_IF([test "$ax_enable_debug_is_release" = "yes"], [ax_enable_debug_default="no"]) m4_define(ax_enable_debug_vars,[m4_normalize(ifelse([$2],,,[$2]))]) |