AC_REQUIRE([AMANDA_WITHOUT_AMRECOVER])
AC_REQUIRE([AMANDA_WITH_CLIENT_ONLY]) dnl deprecated
AC_REQUIRE([AMANDA_WITH_SERVER_ONLY]) dnl deprecated
+ AC_REQUIRE([AMANDA_WITHOUT_NDMP])
# detect invalid combinations of components
if ! ${WANT_SERVER-true} && ${WANT_RESTORE-true}; then
AM_CONDITIONAL(WANT_RESTORE, $WANT_RESTORE)
AM_CONDITIONAL(WANT_SERVER, $WANT_SERVER)
AM_CONDITIONAL(WANT_RECOVER, $WANT_RECOVER)
+ AM_CONDITIONAL(WANT_NDMP, $WANT_NDMP)
AM_CONDITIONAL(WANT_TAPE, $WANT_SERVER || $WANT_RESTORE)
+
+ # AMANDA_COMPONENTS goes to Amanda::Constants; missing_components is just for the
+ # summary, below
+ AMANDA_COMPONENTS=''
+ missing_components=''
+
+ if $WANT_SERVER; then
+ AMANDA_COMPONENTS="$AMANDA_COMPONENTS server";
+ else
+ missing_components="$missing_components (no server)";
+ fi
+ if $WANT_RESTORE; then
+ AMANDA_COMPONENTS="$AMANDA_COMPONENTS restore";
+ else
+ missing_components="$missing_components (no restore)";
+ fi
+ if $WANT_CLIENT; then
+ AMANDA_COMPONENTS="$AMANDA_COMPONENTS client";
+ else
+ missing_components="$missing_components (no client)";
+ fi
+ if $WANT_RECOVER; then
+ AMANDA_COMPONENTS="$AMANDA_COMPONENTS amrecover";
+ else
+ missing_components="$missing_components (no amrecover)";
+ fi
+ if $WANT_NDMP; then
+ AMANDA_COMPONENTS="$AMANDA_COMPONENTS ndmp";
+ else
+ missing_components="$missing_components (no ndmp)";
+ fi
+
+ AC_SUBST(AMANDA_COMPONENTS)
])
AS_HELP_STRING([--without-amrecover],
[do not build amrecover]), [
case "$withval" in
- y | ye | yes) WANT_RECOVER=false;;
+ y | ye | yes) WANT_RECOVER=true;;
n | no) WANT_RECOVER=false;;
*) AC_MSG_ERROR([You must not supply an argument to --with-amrecover option.]) ;;
esac
])
])
+# SYNOPSIS
+#
+# AMANDA_WITHOUT_NDMP
+#
+# OVERVIEW
+#
+# Add option --without-ndmp, and set WANT_NDMP to
+# true or false, accordingly.
+#
+AC_DEFUN([AMANDA_WITHOUT_NDMP], [
+ WANT_NDMP=${WANT_NDMP-true}
+ AC_ARG_WITH(ndmp,
+ AS_HELP_STRING([--without-ndmp],
+ [do not build ndmp]), [
+ case "$withval" in
+ y | ye | yes) WANT_NDMP=true;;
+ n | no) WANT_NDMP=false;;
+ *) AC_MSG_ERROR([You must not supply an argument to --with-ndmp option.]) ;;
+ esac
+ ])
+])
+
## deprecated --with-* options
AC_DEFUN([AMANDA_WITH_CLIENT_ONLY], [
#
AC_DEFUN([AMANDA_SHOW_COMPONENTS_SUMMARY],
[
- components=''
- if $WANT_SERVER; then
- components="$components server";
- else
- components="$components (no server)";
- fi
- if $WANT_RESTORE; then
- components="$components restore";
- else
- components="$components (no restore)";
- fi
- if $WANT_CLIENT; then
- components="$components client";
- else
- components="$components (no client)";
- fi
- if $WANT_RECOVER; then
- components="$components amrecover";
- else
- components="$components (no amrecover)";
- fi
-
- echo "Amanda Components: $components"
+ echo "Amanda Components:$AMANDA_COMPONENTS$missing_components"
])