From 7a95313c31dcf95002dfb1d6e4fd8ed77c2adaf1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 3 May 2018 09:56:35 +0200 Subject: build-sys: --without-systemd disables --with-systemdsystemunitdir Make sure --without-systemd disables also --with-systemdsystemunitdir. Reported-by: L A Walsh Signed-off-by: Karel Zak --- configure.ac | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8c108c8dc..2441a08f6 100644 --- a/configure.ac +++ b/configure.ac @@ -2143,9 +2143,16 @@ AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$have_systemd" = xyes]) AC_ARG_WITH([systemdsystemunitdir], - AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [directory for systemd service files]), - [], [with_systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`]) - + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [directory for systemd service files (requires enabled systemd support)]), + [], [with_systemdsystemunitdir=check] +) +AS_IF([test "x$with_systemdsystemunitdir" = xcheck], [ + AS_IF([test "x$have_systemd" = xyes], [ + with_systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd` + ],[ + with_systemdsystemunitdir=no + ]) +]) AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) ]) @@ -2401,6 +2408,7 @@ AC_MSG_RESULT([ Bash completions: ${with_bashcompletiondir} Systemd support: ${have_systemd} + Systemd unitdir: ${with_systemdsystemunitdir} Btrfs support: ${have_btrfs} Wide-char support: ${build_widechar} -- cgit v1.2.3-55-g7522