Imported Upstream version 3.2.0
[debian/amanda] / config / amanda / debugging.m4
index a9acbd6edfc912726537565dd189615abbed2c86..2ec2258edc9d7e845ad0970eb1f1b9cf91efcbe7 100644 (file)
@@ -150,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)
+])