summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2011-01-28 13:46:58 +0100
committerMarcel Holtmann <marcel@holtmann.org>2011-01-28 13:46:58 +0100
commit0b0bab94933479157499833d728060c27a07f9da (patch)
tree30ad2064fb25ab1b077085702dde752732a0bb34 /configure.ac
parentc7e9340b81e27548a92bef3d4be2c5beffd86f63 (diff)
downloadconnman-0b0bab94933479157499833d728060c27a07f9da.tar.gz
connman-0b0bab94933479157499833d728060c27a07f9da.tar.bz2
connman-0b0bab94933479157499833d728060c27a07f9da.zip
build: Fix checks for systemd unit directory
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 9 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 951b7a34..66bee66c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -326,21 +326,20 @@ else
fi
AC_SUBST(DBUS_DATADIR)
+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 -n "${path_systemdunit}")
+
PKG_CHECK_MODULES(XTABLES, xtables, dummy=yes,
AC_MSG_ERROR(Xtables library is required))
AC_SUBST(XTABLES_CFLAGS)
AC_SUBST(XTABLES_LIBS)
-AC_ARG_WITH([systemdsystemunitdir],
- AC_HELP_STRING([--with-systemdsystemunitdir=DIR],
- [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 -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
-
AC_ARG_ENABLE(polkit,
AC_HELP_STRING([--enable-polkit], [enable PolicyKit support]),
[enable_polkit=${enableval}], [enable_polkit="no"])