X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=config%2Famanda%2Fcomponents.m4;h=56fed5fa5ed83e8c7ac06dc2c56adac56c960386;hb=e96b2990ce0fcabdbb22d1fb966e82a1e6cb52d7;hp=8c7b902b5708b61d2c0806f9405d6d9982f44e6a;hpb=6ba576375c19b829b2a13dbe6562eedd2716b9ea;p=debian%2Famanda diff --git a/config/amanda/components.m4 b/config/amanda/components.m4 index 8c7b902..56fed5f 100644 --- a/config/amanda/components.m4 +++ b/config/amanda/components.m4 @@ -20,6 +20,7 @@ AC_DEFUN([AMANDA_CHECK_COMPONENTS], [ 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 @@ -33,8 +34,42 @@ AC_DEFUN([AMANDA_CHECK_COMPONENTS], [ 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) ]) @@ -118,13 +153,35 @@ AC_DEFUN([AMANDA_WITHOUT_AMRECOVER], [ 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], [ @@ -151,27 +208,5 @@ AC_DEFUN([AMANDA_WITH_SERVER_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" ])