]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
build-sys: make environment.d support conditional
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 18 Feb 2017 16:28:12 +0000 (11:28 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 21 Feb 2017 04:32:53 +0000 (23:32 -0500)
We have ./configure switches for various parts of non-essential functionality,
let's add one for this new stuff too. Support for environment generators is
not conditional — if you don't want them, just don't install any.

Makefile.am
configure.ac

index 337a053eade8ef5db42024525d3a3ac459f5ee1d..96382baffa9da02b4978241136a4b8ca0b6271ff 100644 (file)
@@ -345,12 +345,14 @@ install-touch-usr-hook:
 INSTALL_EXEC_HOOKS += \
        install-target-wants-hook \
        install-directories-hook \
-       install-environment-conf-hook \
        install-aliases-hook \
-       install-touch-usr-hook
+       install-touch-usr-hook \
+       install-busnames-target-wants-hook
 
+if ENABLE_ENVIRONMENT_D
 INSTALL_EXEC_HOOKS += \
-       install-busnames-target-wants-hook
+       install-environment-conf-hook
+endif
 
 # ------------------------------------------------------------------------------
 AM_V_M4 = $(AM_V_M4_$(V))
@@ -432,8 +434,10 @@ systemgenerator_PROGRAMS = \
        systemd-system-update-generator \
        systemd-debug-generator
 
+if ENABLE_ENVIRONMENT_D
 userenvgenerator_PROGRAMS = \
        30-systemd-environment-d-generator
+endif
 
 dist_bashcompletion_data = \
        shell-completion/bash/busctl \
index ab1d17c53177e8a4fe884979f43bf2207a518c3d..01bbf9938280861d0d0fd39e5415999a54cb4209 100644 (file)
@@ -1040,6 +1040,14 @@ if test "x$enable_tmpfiles" != "xno"; then
 fi
 AM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
 
+# ------------------------------------------------------------------------------
+have_environment_d=no
+AC_ARG_ENABLE(environment-d, AS_HELP_STRING([--disable-environment-d], [disable environment.d support]))
+if test "x$enable_environment_d" != "xno"; then
+        have_environment_d=yes
+fi
+AM_CONDITIONAL(ENABLE_ENVIRONMENT_D, [test "$have_environment_d" = "yes"])
+
 # ------------------------------------------------------------------------------
 have_sysusers=no
 AC_ARG_ENABLE(sysusers, AS_HELP_STRING([--disable-sysusers], [disable sysusers support]))
@@ -1655,6 +1663,7 @@ AC_MSG_RESULT([
         vconsole:                          ${have_vconsole}
         quotacheck:                        ${have_quotacheck}
         tmpfiles:                          ${have_tmpfiles}
+        environment.d:                     ${have_environment_d}
         sysusers:                          ${have_sysusers}
         firstboot:                         ${have_firstboot}
         randomseed:                        ${have_randomseed}