Use --with-systemdsystemunitdir instead of --enabled-systemd so it's
possible to enable systemd even if systemd is not installed.
---
 configure.ac |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index b034ff0..20a1fc6 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_SUBST(SYSTEMD_UNITDIR)
+AC_ARG_WITH([systemdsystemunitdir],
+       AS_HELP_STRING([--with-systemdsystemunitdir=PATH],
+                      [path to systemd service directory]),
+       [], [with_systemdsystemunitdir=$($PKG_CONFIG 
--variable=systemdsystemunitdir systemd)])
+if test "x$with_systemdsystemunitdir" != xno; then
+    AC_SUBST([SYSTEMD_UNITDIR], [$with_systemdsystemunitdir])
 fi
-AM_CONDITIONAL(SYSTEMD, test "${enable_systemd}" = "yes")
+AM_CONDITIONAL(SYSTEMD, [test -n "$with_systemdsystemunitdir" -a 
"x$with_systemdsystemunitdir" != xno ])
 
 AC_ARG_ENABLE(capng, AC_HELP_STRING([--enable-capng],
                [enable capabilities support]), [enable_capng=${enableval}])
-- 
1.7.3.5

_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to