Imported Upstream version 3.1.0
[debian/amanda] / config / amanda / debugging.m4
index 4a499dc553469401ec7ee40d2321d4eef9635d65..e51a25281fdeb25729b18b389b920dcc7274a9cf 100644 (file)
@@ -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,28 @@ AC_DEFUN([AMANDA_WITH_TESTING],
         [The name for the Kerberized Amanda service. ])
 ])
 
+# SYNOPSIS
+#
+#   AMANDA_CHECK_SCRIPTS_AT_BUILD
+#
+# OVERVIEW
+#
+#   Handles the --disable-syntax-checks flag, which un-sets the
+#   CHECK_SCRIPTS_AT_BUILD automake conditional
+
+AC_DEFUN([AMANDA_DISABLE_SYNTAX_CHECKS],
+[
+    AC_ARG_ENABLE(syntax-checks,
+       AS_HELP_STRING([--disable-syntax-checks],
+           [Do not perform syntax checks when installing]),
+       [
+           case "$enableval" in
+               no) CHECK_SCRIPTS_AT_BUILD=false;;
+               *) CHECK_SCRIPTS_AT_BUILD=true;;
+           esac
+       ], [
+           CHECK_SCRIPTS_AT_BUILD=true
+       ])
+
+    AM_CONDITIONAL(CHECK_SCRIPTS_AT_BUILD, $CHECK_SCRIPTS_AT_BUILD)
+])