[PATCH v2 1/3] configure: Improve --with-init-script=check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4380724..4149e20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])
     ;;
-- 
2.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]