#
# 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]),
case "$withval" in
n | no) : ;;
y | ye | yes)
+ ASSERTIONS=1
AC_DEFINE(ASSERTIONS,1,
[Define if you want assertion checking. ])
;;
esac
]
)
+ AC_SUBST(ASSERTIONS)
])
# SYNOPSIS
[Location of Amanda directories and files. ])
])
+# SYNOPSIS
+#
+# AMANDA_GLIBC_BACKTRACE
+#
+# OVERVIEW
+#
+# Check for glibc's backtrace support, and define HAVE_GLIBC_BACKTRACE if it is present.
+AC_DEFUN([AMANDA_GLIBC_BACKTRACE],
+[
+ AC_CHECK_HEADER([execinfo.h], [
+ AC_CHECK_FUNC([backtrace_symbols_fd], [
+ AC_DEFINE(HAVE_GLIBC_BACKTRACE, 1,
+ [Define this if glibc's backtrace functionality (execinfo.h) is present])
+ ])
+ ])
+])
+
# SYNOPSIS
#
# AMANDA_WITH_DEBUG_DAYS
[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)
+])