[systemd-devel] [PATCH 4/5] build-sys: add --enable-systemd configure option

William Hubbs w.d.hubbs at gmail.com
Tue Jun 12 10:52:41 PDT 2012


---
 Makefile.am  |    9 ++++++++-
 configure.ac |    8 ++++++++
 2 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e3e1cf1..55ee80a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -238,7 +238,10 @@ SED_PROCESS = \
 
 include Makefile-shared.am
 include Makefile-udev.am
+
+if ENABLE_SYSTEMD
 include Makefile-systemd.am
+endif
 
 man/%: man/%.in Makefile
 	$(SED_PROCESS)
@@ -297,7 +300,11 @@ install-exec-hook: $(INSTALL_EXEC_HOOKS)
 
 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
 
-install-data-hook: systemd-install-data-hook $(INSTALL_DATA_HOOKS)
+if ENABLE_SYSTEMD
+INSTALL_DATA_HOOKS = systemd-install-data-hook $(INSTALL_DATA_HOOKS)
+endif
+
+install-data-hook: $(INSTALL_DATA_HOOKS)
 
 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
 
diff --git a/configure.ac b/configure.ac
index e0a2526..dbbb6e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -692,6 +692,13 @@ AS_IF([test "x${enable_split_usr}" = "xyes"], [
         AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
 ])
 
+have_systemd=no
+AC_ARG_ENABLE(systemd, AS_HELP_STRING([--disable-systemd], [Disable building systemd]))
+if test "x$enable_systemd" != "xno"; then
+        have_systemd=yes
+fi
+AM_CONDITIONAL(ENABLE_SYSTEMD, [test "$have_systemd" = "yes"])
+
 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
@@ -734,6 +741,7 @@ AC_MSG_RESULT([
         timedated:               ${have_timedated}
         localed:                 ${have_localed}
         coredump:                ${have_coredump}
+        systemd:                 ${have_systemd}
         firmware path:           ${FIRMWARE_PATH}
         usb.ids:                 ${USB_DATABASE}
         pci.ids:                 ${PCI_DATABASE}
-- 
1.7.3.4



More information about the systemd-devel mailing list