diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2011-01-26 01:23:13 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-01-26 01:23:13 +0100 |
commit | cdbacb918f7ec9a8562da4153173b80994e9a40c (patch) | |
tree | bfc063698d7aeac694dc8e2d010c6a05bcd0a61b /configure.ac | |
parent | fa6cd58e1ef6db93cb20f9843f0a620e7e4ad1a9 (diff) | |
download | connman-cdbacb918f7ec9a8562da4153173b80994e9a40c.tar.gz connman-cdbacb918f7ec9a8562da4153173b80994e9a40c.tar.bz2 connman-cdbacb918f7ec9a8562da4153173b80994e9a40c.zip |
configure: Do not fail when systemd is not installed
Use --with-systemdsystemunitdir instead of --enabled-systemd so it's
possible to enable systemd even if systemd is not installed.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 63506ace..1bfff1e2 100644 --- a/configure.ac +++ b/configure.ac @@ -321,19 +321,15 @@ PKG_CHECK_MODULES(XTABLES, xtables, dummy=yes, AC_SUBST(XTABLES_CFLAGS) AC_SUBST(XTABLES_LIBS) - -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 "${SYSTEMD_UNITDIR}"); then - SYSTEMD_UNITDIR="/lib/systemd/system" - fi - AC_SUBST(SYSTEMD_UNITDIR) +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 "${enable_systemd}" = "yes") +AM_CONDITIONAL(SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) AC_ARG_ENABLE(polkit, AC_HELP_STRING([--enable-polkit], [enable PolicyKit support]), |