]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: --without-systemd disables --with-systemdsystemunitdir
authorKarel Zak <kzak@redhat.com>
Thu, 3 May 2018 07:56:35 +0000 (09:56 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 3 May 2018 07:56:35 +0000 (09:56 +0200)
Make sure --without-systemd disables also --with-systemdsystemunitdir.

Reported-by: L A Walsh <lkml@tlinx.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac

index 8c108c8dc14ed99b1c1e97f00c595efc43959049..2441a08f65f2a5fc3fa8155339d3abaf592368c0 100644 (file)
@@ -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}