From 3037777ac3a62b7d89fa7bfeb20162f44429fd1f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 24 Aug 2011 11:55:26 +0100 Subject: [PATCH 3/4] 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 --- configure.ac | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index de7d5d2..c631506 100644 --- a/configure.ac +++ b/configure.ac @@ -1368,7 +1368,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)], + [with_systemdsystemunitdir=no]) + ]) if test "x$with_systemdsystemunitdir" != xno; then AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) fi -- 1.7.5.4