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

[Xen-devel] [PATCH] 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 in AC_ARG_ENABLE and AC_ARG_WITH at
the same time. We intentionally omit help string in AC_ARG_ENABLE so
that it is not visible to users.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/configure    | 23 +++++++++++++++++++----
 tools/configure.ac | 15 ++++++++++-----
 2 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/tools/configure b/tools/configure
index 3b55fb2e36..d8a833a968 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1498,6 +1498,16 @@ Optional Features:
                           for Linux or NetBSD x86, otherwise off)
   --enable-rombios        Enable ROMBIOS, (DEFAULT is on if qemu-traditional
                           is enabled, otherwise off)
+if test "x$enable_rombios" = "xno"; then :
+
+        ipxe="n"
+
+else
+
+        ipxe="y"
+
+fi
+]
   --enable-systemd        Enable systemd support (default is DISABLED)
 
 Optional Packages:
@@ -4604,6 +4614,11 @@ _ACEOF
 
 fi
 
+# Check whether --enable-ipxe was given.
+if test "${enable_ipxe+set}" = set; then :
+  enableval=$enable_ipxe;
+fi
+
 
 # Check whether --with-system-ipxe was given.
 if test "${with_system_ipxe+set}" = set; then :
@@ -4615,11 +4630,11 @@ if test "${with_system_ipxe+set}" = set; then :
         /*)  ipxe_path=$withval ;;
         *) as_fn_error $? "IPXE specified, but is not an absolute path" 
"$LINENO" 5 ;;
     esac
+    if test "x$enable_rombios" = "xno"; then :
 
-    # IPXE depends on Rombios
-    if test "x$enable_rombios" = "xno"; then
-        as_fn_error $? "Rombios is required for using IPXE" "$LINENO" 5
-    fi
+        ipxe_path=
+
+fi
 
 fi
 
diff --git a/tools/configure.ac b/tools/configure.ac
index 0f85472602..4e2f31cf03 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -244,6 +244,13 @@ AS_IF([test "x$ovmf" = "xy" -o -n "$ovmf_path" ], [
                        [OVMF path])
 ])
 
+AC_ARG_ENABLE([ipxe],
+    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
@@ -255,11 +262,9 @@ AC_ARG_WITH([system-ipxe],
         /*)  ipxe_path=$withval ;;
         *) 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$enable_rombios" = "xno"], [
+        ipxe_path=
+    ], [])
 ],[])
 AS_IF([test "x$ipxe" = "xy" -o -n "$ipxe_path" ], [
     AC_DEFINE_UNQUOTED([IPXE_PATH],
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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