]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
tools/configure: only require bcc/ld86/as86 when needed
authorDoug Goldstein <cardoe@cardoe.com>
Wed, 24 Feb 2016 15:03:29 +0000 (09:03 -0600)
committerWei Liu <wei.liu2@citrix.com>
Tue, 15 Mar 2016 16:32:32 +0000 (16:32 +0000)
bcc/ld86/as86 are necessary when we build ROMBIOS. However if we do not
build it (and are not building qemu-trad), the build requirements are
overly strict and can lead to failures.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
README
tools/configure
tools/configure.ac

diff --git a/README b/README
index fe2e7c6924b6449aa85a27f777c9847f701114e6..a95eed042f4f0a7bc3032dafef8587ebd924a2fb 100644 (file)
--- a/README
+++ b/README
@@ -61,7 +61,6 @@ provided by your OS distributor:
     * iproute package (/sbin/ip)
     * GNU bison and GNU flex
     * GNU gettext
-    * 16-bit x86 assembler, loader and compiler (dev86 rpm or bin86 & bcc debs)
     * ACPI ASL compiler (iasl)
     * Libc multiarch package (e.g. libc6-dev-i386 / glibc-devel.i686).
       Required when building on a 64-bit platform to build
@@ -81,6 +80,8 @@ disabled at compile time:
       libnl-3-dev, etc).  Required if network buffering is desired
       when using Remus with libxl.  See docs/README.remus for detailed
       information.
+    * 16-bit x86 assembler, loader and compiler for qemu-traditional / rombios
+      (dev86 rpm or bin86 & bcc debs)
 
 Second, you need to acquire a suitable kernel for use in domain 0. If
 possible you should use a kernel provided by your OS distributor. If
index ed38d347434ec4edc77cad342c89b48cd520dcf6..a3cf063dc4fbb017cf7215f3e0bb6448eb155a43 100755 (executable)
@@ -682,9 +682,6 @@ INSTALL_PROGRAM
 SET_MAKE
 AWK
 IASL
-BCC
-LD86
-AS86
 XGETTEXT
 BASH
 XML
@@ -704,6 +701,9 @@ qemu_xen_systemd
 qemu_xen_path
 qemu_xen
 rombios
+BCC
+LD86
+AS86
 qemu_traditional
 blktap2
 LINUX_BACKEND_MODULES
@@ -4242,6 +4242,141 @@ fi
 
 if test "x$enable_rombios" = "xyes"; then :
 
+                # Extract the first word of "as86", so it can be a program name with args.
+set dummy as86; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_AS86+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $AS86 in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_AS86="$AS86" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_AS86="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_AS86" && ac_cv_path_AS86="no"
+  ;;
+esac
+fi
+AS86=$ac_cv_path_AS86
+if test -n "$AS86"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS86" >&5
+$as_echo "$AS86" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test x"${AS86}" = x"no"
+then
+    as_fn_error $? "Unable to find as86, please install as86" "$LINENO" 5
+fi
+    # Extract the first word of "ld86", so it can be a program name with args.
+set dummy ld86; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_LD86+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $LD86 in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LD86="$LD86" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_LD86="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_LD86" && ac_cv_path_LD86="no"
+  ;;
+esac
+fi
+LD86=$ac_cv_path_LD86
+if test -n "$LD86"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD86" >&5
+$as_echo "$LD86" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test x"${LD86}" = x"no"
+then
+    as_fn_error $? "Unable to find ld86, please install ld86" "$LINENO" 5
+fi
+    # Extract the first word of "bcc", so it can be a program name with args.
+set dummy bcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BCC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $BCC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_BCC="$BCC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_BCC="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_BCC" && ac_cv_path_BCC="no"
+  ;;
+esac
+fi
+BCC=$ac_cv_path_BCC
+if test -n "$BCC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BCC" >&5
+$as_echo "$BCC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test x"${BCC}" = x"no"
+then
+    as_fn_error $? "Unable to find bcc, please install bcc" "$LINENO" 5
+fi
 
 $as_echo "#define HAVE_ROMBIOS 1" >>confdefs.h
 
@@ -7315,141 +7450,6 @@ then
 fi
 case "$host_cpu" in
 i[3456]86|x86_64)
-    # Extract the first word of "as86", so it can be a program name with args.
-set dummy as86; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_AS86+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $AS86 in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_AS86="$AS86" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_AS86="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_AS86" && ac_cv_path_AS86="no"
-  ;;
-esac
-fi
-AS86=$ac_cv_path_AS86
-if test -n "$AS86"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS86" >&5
-$as_echo "$AS86" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test x"${AS86}" = x"no"
-then
-    as_fn_error $? "Unable to find as86, please install as86" "$LINENO" 5
-fi
-    # Extract the first word of "ld86", so it can be a program name with args.
-set dummy ld86; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_LD86+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $LD86 in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_LD86="$LD86" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_LD86="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_LD86" && ac_cv_path_LD86="no"
-  ;;
-esac
-fi
-LD86=$ac_cv_path_LD86
-if test -n "$LD86"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD86" >&5
-$as_echo "$LD86" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test x"${LD86}" = x"no"
-then
-    as_fn_error $? "Unable to find ld86, please install ld86" "$LINENO" 5
-fi
-    # Extract the first word of "bcc", so it can be a program name with args.
-set dummy bcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_BCC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $BCC in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_BCC="$BCC" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_BCC="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_BCC" && ac_cv_path_BCC="no"
-  ;;
-esac
-fi
-BCC=$ac_cv_path_BCC
-if test -n "$BCC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BCC" >&5
-$as_echo "$BCC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test x"${BCC}" = x"no"
-then
-    as_fn_error $? "Unable to find bcc, please install bcc" "$LINENO" 5
-fi
     # Extract the first word of "iasl", so it can be a program name with args.
 set dummy iasl; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
index 6c70040164166a639d5f2d5b2a47e91bb14de118..5b5dda49e45ce059f730099c6daae6c094271d1f 100644 (file)
@@ -164,7 +164,13 @@ AC_ARG_ENABLE([rombios],
     ])
 ])
 AS_IF([test "x$enable_rombios" = "xyes"], [
-AC_DEFINE([HAVE_ROMBIOS], [1], [ROMBIOS enabled])
+    dnl as86, ld86, and bcc are only required when building rombios. They
+    dnl are only needed when the host system is x86 but that check is done
+    dnl for us above when checking if we should build with qemu-traditional.
+    AX_PATH_PROG_OR_FAIL([AS86], [as86])
+    AX_PATH_PROG_OR_FAIL([LD86], [ld86])
+    AX_PATH_PROG_OR_FAIL([BCC], [bcc])
+    AC_DEFINE([HAVE_ROMBIOS], [1], [ROMBIOS enabled])
     rombios=y],[
     rombios=n
 ])
@@ -320,9 +326,6 @@ dnl going to run, not the platform on which we are building (known as
 dnl "build" in gnu speak).
 case "$host_cpu" in
 i[[3456]]86|x86_64)
-    AX_PATH_PROG_OR_FAIL([AS86], [as86])
-    AX_PATH_PROG_OR_FAIL([LD86], [ld86])
-    AX_PATH_PROG_OR_FAIL([BCC], [bcc])
     AX_PATH_PROG_OR_FAIL([IASL], [iasl])
     ;;
 esac