summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-09-16 10:50:01 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-09-21 11:25:48 +0100
commit3f1af382a13cd21eea7e7e0addd0183400e7fd69 (patch)
tree597d544df7d0f1ee8b2164dc36eb077761ee2a38
parentd55b3efbdef877642a154dfdca43d760795cdd9c (diff)
Only ask pkg-config for the systemd unit directory if both are installed
pkg-config is not a hard dependency, and this check avoids errors in a minimal build environment: ./configure: line 21777: --variable=systemdsystemunitdir: command not found Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37847 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7566447c..f44dfe3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1373,7 +1373,12 @@ AM_CONDITIONAL(DBUS_INIT_SCRIPTS_CYGWIN, test x$with_init_scripts = xcygwin)
##### systemd unit files
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
- [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+ [],
+ [
+ PKG_CHECK_EXISTS([systemd],
+ [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)],
+ [with_systemdsystemunitdir=no])
+ ])
if test "x$with_systemdsystemunitdir" != xno; then
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
fi