X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=config%2Famanda%2Fdebugging.m4;h=2ec2258edc9d7e845ad0970eb1f1b9cf91efcbe7;hb=c16b04cb8ba646250049afa94e22e7a800b94e7d;hp=4a499dc553469401ec7ee40d2321d4eef9635d65;hpb=fb2bd066c2f8b34addafe48d62550e3033a59431;p=debian%2Famanda diff --git a/config/amanda/debugging.m4 b/config/amanda/debugging.m4 index 4a499dc..2ec2258 100644 --- a/config/amanda/debugging.m4 +++ b/config/amanda/debugging.m4 @@ -4,10 +4,12 @@ # # OVERVIEW # -# Handles the --with-assertions flag. Defines ASSERTIONS if the flag is given. +# Handles the --with-assertions flag. Defines and substitutes ASSERTIONS +# if the flag is given. # AC_DEFUN([AMANDA_WITH_ASSERTIONS], [ + ASSERTIONS= AC_ARG_WITH(assertions, AS_HELP_STRING([--with-assertions], [compile assertions into code]), @@ -15,6 +17,7 @@ AC_DEFUN([AMANDA_WITH_ASSERTIONS], case "$withval" in n | no) : ;; y | ye | yes) + ASSERTIONS=1 AC_DEFINE(ASSERTIONS,1, [Define if you want assertion checking. ]) ;; @@ -23,6 +26,7 @@ AC_DEFUN([AMANDA_WITH_ASSERTIONS], esac ] ) + AC_SUBST(ASSERTIONS) ]) # SYNOPSIS @@ -146,3 +150,32 @@ AC_DEFUN([AMANDA_WITH_TESTING], [The name for the Kerberized Amanda service. ]) ]) +# SYNOPSIS +# +# AMANDA_ENABLE_SYNTAX_CHECKS +# +# OVERVIEW +# +# Handles the --enable-syntax-checks flag, which triggers syntax checks +# for most 'make' targets, but causes spurious errors in all but the most +# carefully-constructed build environments. + +AC_DEFUN([AMANDA_DISABLE_SYNTAX_CHECKS], +[ + AC_ARG_ENABLE(syntax-checks, + AS_HELP_STRING([--enable-syntax-checks], + [Perform syntax checks when installing - developers only]), + [ + case "$enableval" in + no) SYNTAX_CHECKS=false;; + *) + SYNTAX_CHECKS=true + AMANDA_MSG_WARN([--enable-syntax-checks can cause build failures and should only be used by developers]) + ;; + esac + ], [ + SYNTAX_CHECKS=false + ]) + + AM_CONDITIONAL(SYNTAX_CHECKS, $SYNTAX_CHECKS) +])