configure: do not depend on SEABIOS_PATH or OVMF_PATH ...
authorAnthony PERARD <anthony.perard@citrix.com>
Thu, 8 Oct 2015 15:26:32 +0000 (16:26 +0100)
committerWei Liu <wei.liu2@citrix.com>
Thu, 18 Aug 2016 16:24:39 +0000 (17:24 +0100)
... to compile SeaBIOS and OVMF. Only depend on CONFIG_*.

If --with-system-* configure option is used, then set *_CONFIG=n to not
compile SEABIOS and OVMF.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/configure
tools/configure.ac
tools/firmware/Makefile

index c1823917c4f85958783b2b241c0df0c4037088a5..81ccf340600f71cce2b6a6824013ea3f7cb5dae2 100755 (executable)
@@ -695,8 +695,6 @@ APPEND_INCLUDES
 PREPEND_LIB
 PREPEND_INCLUDES
 EXTRA_QEMUU_CONFIGURE_ARGS
-ovmf_path
-seabios_path
 qemu_xen_systemd
 qemu_xen_path
 qemu_xen
@@ -4442,6 +4440,8 @@ _ACEOF
 # Check whether --with-system-seabios was given.
 if test "${with_system_seabios+set}" = set; then :
   withval=$with_system_seabios;
+    # Disable compilation of SeaBIOS.
+    seabios=n
     case $withval in
         no) seabios_path= ;;
         *)  seabios_path=$withval ;;
@@ -4450,7 +4450,6 @@ if test "${with_system_seabios+set}" = set; then :
 fi
 
 
-
 cat >>confdefs.h <<_ACEOF
 #define SEABIOS_PATH "${seabios_path:-$XENFIRMWAREDIR/bios.bin}"
 _ACEOF
@@ -4460,6 +4459,8 @@ _ACEOF
 # Check whether --with-system-ovmf was given.
 if test "${with_system_ovmf+set}" = set; then :
   withval=$with_system_ovmf;
+    # Disable compilation of OVMF.
+    ovmf=n
     case $withval in
         no) ovmf_path= ;;
         *)  ovmf_path=$withval ;;
@@ -4468,7 +4469,6 @@ if test "${with_system_ovmf+set}" = set; then :
 fi
 
 
-
 cat >>confdefs.h <<_ACEOF
 #define OVMF_PATH "${ovmf_path:-$XENFIRMWAREDIR/ovmf.bin}"
 _ACEOF
index ed109021fe18d45e779820127c7beb9b5a96a781..c12ad791581f6ce246124b96d17f1ed04c8f3c13 100644 (file)
@@ -215,12 +215,13 @@ AC_ARG_WITH([system-seabios],
     AS_HELP_STRING([--with-system-seabios@<:@=PATH@:>@],
        [Use system supplied seabios PATH instead of building and installing
         our own version]),[
+    # Disable compilation of SeaBIOS.
+    seabios=n
     case $withval in
         no) seabios_path= ;;
         *)  seabios_path=$withval ;;
     esac
 ],[])
-AC_SUBST(seabios_path)
 AC_DEFINE_UNQUOTED([SEABIOS_PATH],
                    ["${seabios_path:-$XENFIRMWAREDIR/bios.bin}"],
                    [SeaBIOS path])
@@ -229,12 +230,13 @@ AC_ARG_WITH([system-ovmf],
     AS_HELP_STRING([--with-system-ovmf@<:@=PATH@:>@],
        [Use system supplied OVMF PATH instead of building and installing
         our own version]),[
+    # Disable compilation of OVMF.
+    ovmf=n
     case $withval in
         no) ovmf_path= ;;
         *)  ovmf_path=$withval ;;
     esac
 ],[])
-AC_SUBST(ovmf_path)
 AC_DEFINE_UNQUOTED([OVMF_PATH],
                    ["${ovmf_path:-$XENFIRMWAREDIR/ovmf.bin}"],
                    [OVMF path])
index 82b1f6b0eea54f2d22705da62d2b92abd26a2433..cf09ad2ea896c4daa3a08f9611afb6f6ea746482 100644 (file)
@@ -6,12 +6,8 @@ TARGET      := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
 
 SUBDIRS-y :=
-ifeq ($(OVMF_PATH),)
 SUBDIRS-$(CONFIG_OVMF) += ovmf-dir
-endif
-ifeq ($(SEABIOS_PATH),)
 SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir
-endif
 SUBDIRS-$(CONFIG_ROMBIOS) += rombios
 SUBDIRS-$(CONFIG_ROMBIOS) += vgabios
 SUBDIRS-$(CONFIG_ROMBIOS) += etherboot
@@ -46,15 +42,11 @@ install: all
        [ -d $(INST_DIR) ] || $(INSTALL_DIR) $(INST_DIR)
        [ ! -e $(TARGET) ] || $(INSTALL_DATA) $(TARGET) $(INST_DIR)
 ifeq ($(CONFIG_SEABIOS),y)
-ifeq ($(SEABIOS_PATH),)
        $(INSTALL_DATA) seabios-dir/out/bios.bin $(INST_DIR)/bios.bin
 endif
-endif
 ifeq ($(CONFIG_OVMF),y)
-ifeq ($(OVMF_PATH),)
        $(INSTALL_DATA) ovmf-dir/ovmf.bin $(INST_DIR)/ovmf.bin
 endif
-endif
 
 .PHONY: clean
 clean: subdirs-clean