summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-01-06 12:51:21 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-06 12:51:21 -0600
commita2e4d53ec5cc1983a615d87b251726f17358be9a (patch)
treea371a8cbff80eaebdcd30aa5d0148cde2e35fdfd /configure
parent2afee49fc4a366ab740899ec9e79079ec335e0fb (diff)
parentdc10e8b3c556b582eb7919c92d0997b5f9a9d136 (diff)
downloadqemu-a2e4d53ec5cc1983a615d87b251726f17358be9a.zip
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches: qemu-nbd: drop loop which can never loop Make python mandatory net/socket.c: Fix fd leak in net_socket_listen_init() error paths gdbstub: Fix fd leak in gdbserver_open() error path configure: Fix test for supported host CPU type configure: CONFIG_QEMU_INTERP_PREFIX only for user mode scsi virtio-blk usb-msd: Clean up device init error messages Strip trailing '\n' from error_report()'s first argument (again) qemu-options.hx: fix tls-channel help text
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure56
1 files changed, 25 insertions, 31 deletions
diff --git a/configure b/configure
index c136f12f05..0309dad906 100755
--- a/configure
+++ b/configure
@@ -300,8 +300,11 @@ else
cpu=`uname -m`
fi
+ARCH=
+# Normalise host CPU name and set ARCH.
+# Note that this case should only have supported host CPUs, not guests.
case "$cpu" in
- alpha|cris|ia64|lm32|m68k|microblaze|ppc|ppc64|sparc64|unicore32)
+ ia64|ppc|ppc64|s390|s390x|sparc64)
cpu="$cpu"
;;
i386|i486|i586|i686|i86pc|BePC)
@@ -319,20 +322,17 @@ case "$cpu" in
mips*)
cpu="mips"
;;
- s390)
- cpu="s390"
- ;;
- s390x)
- cpu="s390x"
- ;;
sparc|sun4[cdmuv])
cpu="sparc"
;;
*)
- echo "Unsupported CPU = $cpu"
- exit 1
+ # This will result in either an error or falling back to TCI later
+ ARCH=unknown
;;
esac
+if test -z "$ARCH"; then
+ ARCH="$cpu"
+fi
# OS specific
if check_define __linux__ ; then
@@ -1080,6 +1080,18 @@ echo "NOTE: The object files are built at the place where configure is launched"
exit 1
fi
+# Now we have handled --enable-tcg-interpreter and know we're not just
+# printing the help message, bail out if the host CPU isn't supported.
+if test "$ARCH" = "unknown"; then
+ if test "$tcg_interpreter" = "yes" ; then
+ echo "Unsupported CPU = $cpu, will use TCG with TCI (experimental)"
+ ARCH=tci
+ else
+ echo "Unsupported CPU = $cpu, try --enable-tcg-interpreter"
+ exit 1
+ fi
+fi
+
# check that the C compiler works.
cat > $TMPC <<EOF
int main(void) { return 0; }
@@ -1185,13 +1197,9 @@ if test "$solaris" = "yes" ; then
fi
fi
-if test "$guest_agent" != "no" ; then
- if has $python; then
- :
- else
- echo "Python not found. Use --python=/path/to/python"
- exit 1
- fi
+if ! has $python; then
+ echo "Python not found. Use --python=/path/to/python"
+ exit 1
fi
if test -z "$target_list" ; then
@@ -2922,20 +2930,6 @@ echo "sysconfdir=$sysconfdir" >> $config_host_mak
echo "docdir=$docdir" >> $config_host_mak
echo "confdir=$confdir" >> $config_host_mak
-case "$cpu" in
- i386|x86_64|alpha|arm|cris|hppa|ia64|lm32|m68k|microblaze|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64|unicore32)
- ARCH=$cpu
- ;;
- *)
- if test "$tcg_interpreter" = "yes" ; then
- echo "Unsupported CPU = $cpu, will use TCG with TCI (experimental)"
- ARCH=tci
- else
- echo "Unsupported CPU = $cpu, try --enable-tcg-interpreter"
- exit 1
- fi
- ;;
-esac
echo "ARCH=$ARCH" >> $config_host_mak
if test "$debug_tcg" = "yes" ; then
echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
@@ -3414,7 +3408,6 @@ echo "# Automatically generated by configure - do not modify" > $config_target_m
bflt="no"
target_nptl="no"
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"`
-echo "CONFIG_QEMU_INTERP_PREFIX=\"$interp_prefix1\"" >> $config_target_mak
gdb_xml_files=""
target_short_alignment=2
target_int_alignment=4
@@ -3620,6 +3613,7 @@ if test "$target_softmmu" = "yes" ; then
fi
if test "$target_user_only" = "yes" ; then
echo "CONFIG_USER_ONLY=y" >> $config_target_mak
+ echo "CONFIG_QEMU_INTERP_PREFIX=\"$interp_prefix1\"" >> $config_target_mak
fi
if test "$target_linux_user" = "yes" ; then
echo "CONFIG_LINUX_USER=y" >> $config_target_mak