]> xenbits.xensource.com Git - libvirt.git/commitdiff
configure: Improve --with-init-script=check
authorAndrea Bolognani <abologna@redhat.com>
Thu, 28 Apr 2016 14:57:35 +0000 (16:57 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 2 May 2016 15:18:05 +0000 (17:18 +0200)
If we didn't find a match, either because we're cross compiling
or because we're not building on RHEL, we won't install any
init script.

Make sure this is reported correctly in the configure summary.

configure.ac

index 43807240143963e31e57f00c070bc51a67b5377b..4149e20d93d1235786a7f68bb4dd83164f0fa46e 100644 (file)
@@ -630,6 +630,19 @@ AC_ARG_WITH([init-script],
 init_redhat=no
 init_systemd=no
 init_upstart=no
+if test "$with_init_script" = check; then
+    if test "$cross_compiling" = yes; then
+        with_init_script=none
+    fi
+    if test -f /etc/redhat-release; then
+        if test "$with_init_script" = check; then
+            with_init_script=redhat
+        fi
+    fi
+    if test "$with_init_script" = check; then
+        with_init_script=none
+    fi
+fi
 case "$with_init_script" in
     systemd+redhat)
        init_redhat=yes
@@ -646,12 +659,6 @@ case "$with_init_script" in
        ;;
     none)
        ;;
-    check)
-       if test "$cross_compiling" != yes && test -f /etc/redhat-release; then
-          init_redhat=yes
-          with_init_script=redhat
-       fi
-       ;;
     *)
        AC_MSG_ERROR([Unknown initscript flavour $with_init_script])
     ;;