]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
configure: don't silently disable systemd support
authorWei Liu <wei.liu2@citrix.com>
Thu, 10 Sep 2015 11:18:03 +0000 (12:18 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 10 Sep 2015 11:31:23 +0000 (12:31 +0100)
Originally when user runs ./configure --enable-systemd and systemd
development library is not available the build system silently disables
systemd support. This is not in line with normal expectation.

Instead, configure should error out when user has asked for systemd
support but development libraries can't be found.

Reported-by: George Dunlap <george.dunlap@eu.citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
m4/systemd.m4
tools/configure

index 8284993223a77bebc01849eb5533886c048d8774..e4b1aa5800635e4299a789c15b6d1632bfc12928 100644 (file)
@@ -85,7 +85,11 @@ AC_DEFUN([AX_CHECK_SYSTEMD], [
                AC_DEFINE([HAVE_SYSTEMD], [1], [Systemd available and enabled])
                        systemd=y
                        AX_CHECK_SYSTEMD_LIBS()
-           ],[systemd=n])
+           ],[
+               AS_IF([test "x$enable_systemd" = "xyes"],
+                       [AC_MSG_ERROR([Unable to find systemd development library])],
+                       [systemd=n])
+           ])
        ],[systemd=n])
 ])
 
index 99677d1634c5c5b8e88da76961dd5136b08f5b01..41bed7712ad3ec0ac0c7a1d30d9b43065b1958ab 100755 (executable)
@@ -9317,10 +9317,16 @@ fi
 fi
 
 
+else
+
+               if test "x$enable_systemd" = "xyes"; then :
+  as_fn_error $? "Unable to find systemd development library" "$LINENO" 5
 else
   systemd=n
 fi
 
+fi
+
 else
   systemd=n
 fi