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

[Xen-changelog] [xen master] tools: fix dependency for ipxe and rombios



commit 205134148981fa22e49f25f16e97e847dfb7c29b
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Wed Jul 18 17:02:12 2018 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Wed Jul 18 17:30:24 2018 +0100

    tools: fix dependency for ipxe and rombios
    
    It appears that the test in 01d631028 for ipxe's dependency on rombios
    is not good enough. Configuring with --disable-rombios doesn't disable
    ipxe.
    
    Fix it by testing the dependency after AC_ARG_ENABLE and AC_ARG_WITH
    have taken effect.
    
    At the same time, regularise options for ipxe:
    
      --enable-ipxe         enable building in-tree ipxe
      --disable-ipxe        disable building in-tree ipxe
      --with-system-ipxe    specify a path to be baked into code, disable
                            building in-tree ipxe, this trumps 
--{en,dis}able-ipxe
      --without-system-ipxe error
    
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/configure    | 73 +++++++++++++++++++++++++++---------------------------
 tools/configure.ac | 31 +++++++++++++++--------
 2 files changed, 57 insertions(+), 47 deletions(-)

diff --git a/tools/configure b/tools/configure
index 3b55fb2e36..27c8d054ab 100755
--- a/tools/configure
+++ b/tools/configure
@@ -693,6 +693,7 @@ APPEND_INCLUDES
 PREPEND_LIB
 PREPEND_INCLUDES
 EXTRA_QEMUU_CONFIGURE_ARGS
+ipxe
 qemu_xen_systemd
 qemu_xen_path
 qemu_xen
@@ -703,7 +704,6 @@ AS86
 qemu_traditional
 blktap2
 LINUX_BACKEND_MODULES
-ipxe
 seabios
 ovmf
 xsmpolicy
@@ -806,7 +806,6 @@ enable_ocamltools
 enable_xsmpolicy
 enable_ovmf
 enable_seabios
-enable_ipxe
 with_linux_backend_modules
 enable_blktap2
 enable_qemu_traditional
@@ -814,6 +813,7 @@ enable_rombios
 with_system_qemu
 with_system_seabios
 with_system_ovmf
+enable_ipxe
 with_system_ipxe
 with_extra_qemuu_configure_args
 with_xenstored
@@ -1491,13 +1491,14 @@ Optional Features:
   --disable-xsmpolicy     Disable XSM policy compilation (default is ENABLED)
   --enable-ovmf           Enable OVMF (default is DISABLED)
   --disable-seabios       Disable SeaBIOS (default is ENABLED)
-  --disable-ipxe          Disable IPXE (default is ENABLED)
   --enable-blktap2        Enable blktap2, (DEFAULT is off)
   --enable-qemu-traditional
                           Enable qemu traditional device model, (DEFAULT is on
                           for Linux or NetBSD x86, otherwise off)
   --enable-rombios        Enable ROMBIOS, (DEFAULT is on if qemu-traditional
                           is enabled, otherwise off)
+  --disable-ipxe          Enable in-tree IPXE, (DEFAULT is on if rombios is
+                          enabled, otherwise off, see also --with-system-ipxe)
   --enable-systemd        Enable systemd support (default is DISABLED)
 
 Optional Packages:
@@ -1533,7 +1534,10 @@ Optional Packages:
                           and installing our own version
   --with-system-ipxe[=PATH]
                           Use system supplied IPXE PATH instead of building
-                          and installing our own version
+                          and installing our own version, it takes precedence
+                          over --{en,dis}able-ipxe and is bound by the
+                          presence of rombios, --without-system-ipxe is an
+                          error
   --with-extra-qemuu-configure-args[="--ARG1 ..."]
                           List of additional configure options for upstream
                           qemu
@@ -4191,29 +4195,6 @@ seabios=$ax_cv_seabios
 
 
 
-# Check whether --enable-ipxe was given.
-if test "${enable_ipxe+set}" = set; then :
-  enableval=$enable_ipxe;
-fi
-
-
-if test "x$enable_ipxe" = "xno"; then :
-
-    ax_cv_ipxe="n"
-
-elif test "x$enable_ipxe" = "xyes"; then :
-
-    ax_cv_ipxe="y"
-
-elif test -z $ax_cv_ipxe; then :
-
-    ax_cv_ipxe="y"
-
-fi
-ipxe=$ax_cv_ipxe
-
-
-
 
 # Check whether --with-linux-backend-modules was given.
 if test "${with_linux_backend_modules+set}" = set; then :
@@ -4604,28 +4585,47 @@ _ACEOF
 
 fi
 
+# Check whether --enable-ipxe was given.
+if test "${enable_ipxe+set}" = set; then :
+  enableval=$enable_ipxe;
+     if test "x$enable_ipxe" = "xno"; then :
+  ipxe=n
+else
+  ipxe=y
+fi
+
+else
+
+    if test "x$enable_rombios" = "xno"; then :
+  ipxe=n
+else
+  ipxe=y
+fi
+
+fi
+
 
 # Check whether --with-system-ipxe was given.
 if test "${with_system_ipxe+set}" = set; then :
   withval=$with_system_ipxe;
-    # Disable compilation of IPXE.
-    ipxe=n
     case $withval in
-        no) ipxe_path= ;;
-        /*)  ipxe_path=$withval ;;
+        no) as_fn_error $? "--without-system-ipxe has no effect" "$LINENO" 5 ;;
+        /*)  ipxe_path=$withval; ipxe=n ;;
         *) as_fn_error $? "IPXE specified, but is not an absolute path" 
"$LINENO" 5 ;;
     esac
 
-    # IPXE depends on Rombios
-    if test "x$enable_rombios" = "xno"; then
-        as_fn_error $? "Rombios is required for using IPXE" "$LINENO" 5
-    fi
-
 fi
 
 if test "x$ipxe" = "xy" -o -n "$ipxe_path" ; then :
 
 
+    if test "x$enable_rombios" = "xno"; then :
+
+        as_fn_error $? "Rombios is required to use IPXE" "$LINENO" 5
+
+fi
+
+
 cat >>confdefs.h <<_ACEOF
 #define IPXE_PATH "${ipxe_path:-$XENFIRMWAREDIR/ipxe.bin}"
 _ACEOF
@@ -4634,6 +4634,7 @@ _ACEOF
 fi
 
 
+
 # Check whether --with-extra-qemuu-configure-args was given.
 if test "${with_extra_qemuu_configure_args+set}" = set; then :
   withval=$with_extra_qemuu_configure_args;
diff --git a/tools/configure.ac b/tools/configure.ac
index 0f85472602..bca2545280 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -84,7 +84,6 @@ AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
 AX_ARG_DEFAULT_ENABLE([xsmpolicy], [Disable XSM policy compilation])
 AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
 AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS])
-AX_ARG_DEFAULT_ENABLE([ipxe], [Disable IPXE])
 
 AC_ARG_WITH([linux-backend-modules],
     AS_HELP_STRING([--with-linux-backend-modules="mod1 mod2"],
@@ -244,28 +243,38 @@ AS_IF([test "x$ovmf" = "xy" -o -n "$ovmf_path" ], [
                        [OVMF path])
 ])
 
+AC_ARG_ENABLE([ipxe],
+    AS_HELP_STRING([--disable-ipxe],
+                   [Enable in-tree IPXE, (DEFAULT is on if rombios is enabled,
+                    otherwise off, see also --with-system-ipxe)]),
+    [
+     AS_IF([test "x$enable_ipxe" = "xno"], [ipxe=n], [ipxe=y])
+    ],
+    [
+    AS_IF([test "x$enable_rombios" = "xno"], [ipxe=n], [ipxe=y])
+])
 AC_ARG_WITH([system-ipxe],
     AS_HELP_STRING([--with-system-ipxe@<:@=PATH@:>@],
        [Use system supplied IPXE PATH instead of building and installing
-        our own version]),[
-    # Disable compilation of IPXE.
-    ipxe=n
+        our own version, it takes precedence over --{en,dis}able-ipxe and is
+        bound by the presence of rombios, --without-system-ipxe is an error]),[
     case $withval in
-        no) ipxe_path= ;;
-        /*)  ipxe_path=$withval ;;
+        no) AC_MSG_ERROR([--without-system-ipxe has no effect]) ;;
+        /*)  ipxe_path=$withval; ipxe=n ;;
         *) AC_MSG_ERROR([IPXE specified, but is not an absolute path]) ;;
     esac
-
-    # IPXE depends on Rombios
-    if test "x$enable_rombios" = "xno"; then
-        AC_MSG_ERROR([Rombios is required for using IPXE])
-    fi
 ],[])
 AS_IF([test "x$ipxe" = "xy" -o -n "$ipxe_path" ], [
+
+    AS_IF([test "x$enable_rombios" = "xno"], [
+        AC_MSG_ERROR([Rombios is required to use IPXE])
+    ], [])
+
     AC_DEFINE_UNQUOTED([IPXE_PATH],
                        ["${ipxe_path:-$XENFIRMWAREDIR/ipxe.bin}"],
                        [IPXE path])
 ])
+AC_SUBST(ipxe)
 
 AC_ARG_WITH([extra-qemuu-configure-args],
     AS_HELP_STRING([--with-extra-qemuu-configure-args@<:@="--ARG1 ..."@:>@],
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.