summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2011-01-28 13:47:59 +0100
committerMarcel Holtmann <marcel@holtmann.org>2011-01-28 13:47:59 +0100
commit66f9298c2b4ae54d8581598951f37568095b1b39 (patch)
treeb9db967e7ddb43e118772db20d9d842e23afaefa
parent1166ed5a3ae6cb10ae33a9555c420d856c34b914 (diff)
downloadofono-66f9298c2b4ae54d8581598951f37568095b1b39.tar.bz2
build: Add option to specify systemd unit directory
-rw-r--r--configure.ac16
1 files changed, 6 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index b034ff0f..bb1ed28e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,18 +112,14 @@ else
fi
AC_SUBST(DBUS_DATADIR)
-AC_ARG_ENABLE(systemd, AC_HELP_STRING([--enable-systemd],
- [enable systemd support]), [enable_systemd=${enableval}])
-if (test "${enable_systemd}" = "yes"); then
- PKG_CHECK_MODULES(SYSTEMD, systemd, dummy=yes,
- AC_MSG_ERROR(systemd is required))
- SYSTEMD_UNITDIR="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"
- if (test -z "${SYSTEM_UNITDIR}"); then
- SYSTEMD_UNITDIR="/lib/systemd/system"
- fi
+AC_ARG_WITH([systemdunitdir], AC_HELP_STRING([--with-systemdunitdir=DIR],
+ [path to systemd service directory]), [path_systemdunit=${withval}],
+ [path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
+if (test -n "${path_systemdunit}"); then
+ SYSTEMD_UNITDIR="${path_systemdunit}"
AC_SUBST(SYSTEMD_UNITDIR)
fi
-AM_CONDITIONAL(SYSTEMD, test "${enable_systemd}" = "yes")
+AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
AC_ARG_ENABLE(capng, AC_HELP_STRING([--enable-capng],
[enable capabilities support]), [enable_capng=${enableval}])