summaryrefslogtreecommitdiff
path: root/tools/configure.ac
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2021-11-04 17:11:20 +0100
committerAndrew Cooper <andrew.cooper3@citrix.com>2021-11-04 18:43:20 +0000
commitbcf77ce510047b9d311d9276646cc449c526e3a5 (patch)
tree960009efc6bbfaa82ee148a3d8a86090162e2ca4 /tools/configure.ac
parent86a192e511bd826c59ae1643d06fd52a5bc21ca6 (diff)
downloadxen-bcf77ce510047b9d311d9276646cc449c526e3a5.tar.gz
configure: modify default of building rombios
The tools/configure script will default to build rombios if qemu traditional is enabled. If rombios is being built, ipxe will be built per default, too. This results in rombios and ipxe no longer being built by default when disabling qemu traditional. Fix that be rearranging the dependencies: - build ipxe by default - build rombios by default if either ipxe or qemu traditional are being built This modification prepares not building qemu traditional by default without affecting build of rombios and ipxe. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Ian Jackson <iwj@xenproject.org> Release-acked-by: Ian Jackson <iwj@xenproject.org>
Diffstat (limited to 'tools/configure.ac')
-rw-r--r--tools/configure.ac67
1 files changed, 32 insertions, 35 deletions
diff --git a/tools/configure.ac b/tools/configure.ac
index 6414fcbb44..97582951c8 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -139,10 +139,40 @@ AC_DEFINE([HAVE_QEMU_TRADITIONAL], [1], [Qemu traditional enabled])
])
AC_SUBST(qemu_traditional)
+AC_ARG_ENABLE([ipxe],
+ AS_HELP_STRING([--enable-ipxe],
+ [Enable in-tree IPXE, (DEFAULT is on for x86,
+ otherwise off, see also --with-system-ipxe)]),,[
+ case "$host_cpu" in
+ i[[3456]]86|x86_64)
+ enable_ipxe="yes";;
+ *) enable_ipxe="no";;
+ esac
+])
+AS_IF([test "x$enable_ipxe" = "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, it takes precedence over --{en,dis}able-ipxe,
+ --without-system-ipxe is an error]),[
+ case $withval in
+ 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
+],[])
+AS_IF([test "x$ipxe" = "xy" -o -n "$ipxe_path" ], [
+ AC_DEFINE_UNQUOTED([IPXE_PATH],
+ ["${ipxe_path:-$XENFIRMWAREDIR/ipxe.bin}"],
+ [IPXE path])
+])
+AC_SUBST(ipxe)
+
AC_ARG_ENABLE([rombios],
AS_HELP_STRING([--enable-rombios],
- [Enable ROMBIOS, (DEFAULT is on if qemu-traditional is enabled, otherwise off)]),,[
- AS_IF([test "x$enable_qemu_traditional" = "xyes"], [
+ [Enable ROMBIOS, (DEFAULT is on if qemu-traditional or ipxe is enabled,
+ otherwise off)]),,[
+ AS_IF([test "x$enable_qemu_traditional" = "xyes" -o "x$enable_ipxe" = "xyes"], [
enable_rombios="yes"
], [
enable_rombios="no"
@@ -240,39 +270,6 @@ 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, 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) 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
-],[])
-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 ..."@:>@],
[List of additional configure options for upstream qemu]),[