From: Tobias Brunner Date: Fri, 7 Feb 2014 13:46:25 +0000 (+0100) Subject: conf: Only install config snippets for enabled components X-Git-Tag: 5.1.2rc1~7^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7573a7ed564f7e560d6502f07200f73521d707b5;p=thirdparty%2Fstrongswan.git conf: Only install config snippets for enabled components --- diff --git a/conf/Makefile.am b/conf/Makefile.am index 86792ae3e1..80914418a9 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -89,8 +89,9 @@ confsnippets = $(alloptions:opt=conf) # we only install snippets for enabled plugins plugins_install_tmp = $(charon_plugins:%=plugins/%.tmp) plugins_install_src = $(charon_plugins:%=plugins/%.conf) - -options_install_src = $(options:opt=conf) +# only install snippets for enabled components +# has to be defined via autoconf as we can't do it with automake conditionals +options_install_src = $(strongswan_options:%=options/%.conf) templates_DATA = strongswan.conf optionstemplate_DATA = $(options_install_src) diff --git a/configure.ac b/configure.ac index 94659478ce..7fe5ee1294 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2013 Tobias Brunner +# Copyright (C) 2007-2014 Tobias Brunner # Copyright (C) 2006-2013 Andreas Steffen # Copyright (C) 2006-2013 Martin Willi # Hochschule fuer Technik Rapperswil @@ -1363,6 +1363,25 @@ if test x$ikev2 = xtrue; then AC_DEFINE([USE_IKEV2], [], [support for IKEv2 protocol]) fi +# ==================================================== +# options for enabled modules (see conf/Makefile.am) +# ==================================================== + +strongswan_options= + +AM_COND_IF([USE_ATTR_SQL], [strongswan_options=${strongswan_options}" pool"]) +AM_COND_IF([USE_CHARON], [strongswan_options=${strongswan_options}" charon charon-logging"]) +AM_COND_IF([USE_FILE_CONFIG], [strongswan_options=${strongswan_options}" starter"]) +AM_COND_IF([USE_IMV_ATTESTATION], [strongswan_options=${strongswan_options}" attest"]) +AM_COND_IF([USE_IMCV], [strongswan_options=${strongswan_options}" imcv"]) +AM_COND_IF([USE_IMV_OS], [strongswan_options=${strongswan_options}" pacman"]) +AM_COND_IF([USE_LIBTNCCS], [strongswan_options=${strongswan_options}" tnc"]) +AM_COND_IF([USE_MANAGER], [strongswan_options=${strongswan_options}" manager"]) +AM_COND_IF([USE_MEDSRV], [strongswan_options=${strongswan_options}" medsrv"]) +AM_COND_IF([USE_TOOLS], [strongswan_options=${strongswan_options}" tools"]) + +AC_SUBST(strongswan_options) + # ================= # build Makefiles # =================