3 # AMANDA_WITH_ASSERTIONS
7 # Handles the --with-assertions flag. Defines ASSERTIONS if the flag is given.
9 AC_DEFUN([AMANDA_WITH_ASSERTIONS],
11 AC_ARG_WITH(assertions,
12 AS_HELP_STRING([--with-assertions],
13 [compile assertions into code]),
18 AC_DEFINE(ASSERTIONS,1,
19 [Define if you want assertion checking. ])
21 *) AC_MSG_ERROR([*** You must not supply an argument to --with-assertions option.])
30 # AMANDA_WITH_DEBUGGING
34 # Handles the --with[out]-debugging flag. If debugging is not disabled, then define
35 # DEBUG_CODE, and define and substitute AMANDA_DBGDIR to either the location the
36 # user gave, or AMANDA_TMPDIR.
38 AC_DEFUN([AMANDA_WITH_DEBUGGING],
40 AC_REQUIRE([AMANDA_WITH_TMPDIR])
41 AC_ARG_WITH(debugging,
42 AS_HELP_STRING([--with-debugging=DIR]
43 [put debug logs in DIR (default same as --with-tmpdir)]),
44 [ debugging="$withval" ],
49 n | no) AC_MSG_ERROR([Amanda no longer supports building with debugging disabled]);;
50 y | ye | yes) AMANDA_DBGDIR="$AMANDA_TMPDIR";;
51 *) AMANDA_DBGDIR="$debugging";;
54 # evaluate any extra variables in the directory
55 AC_DEFINE_DIR([AMANDA_DBGDIR], [AMANDA_DBGDIR],
56 [Location of Amanda directories and files. ])
61 # AMANDA_WITH_DEBUG_DAYS
65 # Handles the --with-debug-days flag. Defines and substitutes AMANDA_DEBUG_DAYS.
67 AC_DEFUN([AMANDA_WITH_DEBUG_DAYS],
69 AC_ARG_WITH(debug_days,
70 AS_HELP_STRING([--with-debug-days=NN],
71 [number of days to keep debugging files (default: 4)]),
80 AMANDA_DEBUG_DAYS=0 ;;
82 AMANDA_DEBUG_DAYS=4 ;;
83 [[0-9]] | [[0-9]][[0-9]] | [[0-9]][[0-9]][[0-9]])
84 AMANDA_DEBUG_DAYS="$debug_days" ;;
85 *) AC_MSG_ERROR([*** --with-debug-days value not numeric or out of range.])
88 AC_DEFINE_UNQUOTED(AMANDA_DEBUG_DAYS,$AMANDA_DEBUG_DAYS,
89 [Number of days to keep debugging files. ])
90 AC_SUBST(AMANDA_DEBUG_DAYS)
99 # Handles the --with-testing flag. Defines and substitutes SERVICE_SUFFIX, and
100 # defines AMANDA_SERVICE_NAME and KAMANDA_SERVICE_NAME.
102 AC_DEFUN([AMANDA_WITH_TESTING],
105 AS_HELP_STRING([--with-testing@<:@=SUFFIX@:>@],
106 [use alternate service names with suffix (default 'test')]),
114 n | no) SERVICE_SUFFIX="";;
115 y | ye | yes) SERVICE_SUFFIX="-test";;
116 *) SERVICE_SUFFIX="-$TESTING";;
119 AMANDA_SERVICE_NAME="amanda$SERVICE_SUFFIX"
120 KAMANDA_SERVICE_NAME="kamanda$SERVICE_SUFFIX"
122 AC_SUBST(SERVICE_SUFFIX)
123 AC_DEFINE_UNQUOTED(SERVICE_SUFFIX, "$SERVICE_SUFFIX",
124 [A suffix that will be appended to service names.
125 * Useful for testing in parallel with a working version. ])
126 AC_DEFINE_UNQUOTED(AMANDA_SERVICE_NAME, "$AMANDA_SERVICE_NAME",
127 [The name for the Amanda service. ])
128 AC_DEFINE_UNQUOTED(KAMANDA_SERVICE_NAME, "$KAMANDA_SERVICE_NAME",
129 [The name for the Kerberized Amanda service. ])