aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-11-08 14:47:54 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2021-12-18 10:55:07 +0100
commitba7c60c203eb068cff591e4d0e7dbcc2b5aa013a (patch)
tree1f3d26a96543aa106e9dc772936be2525477bf33 /configure
parent90978e15bc9a23c208b25bf7ea697a5d0925562b (diff)
downloadqemu-ba7c60c203eb068cff591e4d0e7dbcc2b5aa013a.zip
qemu-ba7c60c203eb068cff591e4d0e7dbcc2b5aa013a.tar.gz
qemu-ba7c60c203eb068cff591e4d0e7dbcc2b5aa013a.tar.bz2
configure: make $targetos lowercase, use windows instead of MINGW32
targetos is already mostly the same as Meson host_machine.system(), just in CamelCase. Adjust Windows, which is different, and switch to lowercase to match Meson. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure58
1 files changed, 25 insertions, 33 deletions
diff --git a/configure b/configure
index 28e1cf6..e72e34b 100755
--- a/configure
+++ b/configure
@@ -501,30 +501,30 @@ EOF
}
if check_define __linux__ ; then
- targetos="Linux"
+ targetos=linux
elif check_define _WIN32 ; then
- targetos='MINGW32'
+ targetos=windows
elif check_define __OpenBSD__ ; then
- targetos='OpenBSD'
+ targetos=openbsd
elif check_define __sun__ ; then
- targetos='SunOS'
+ targetos=sunos
elif check_define __HAIKU__ ; then
- targetos='Haiku'
+ targetos=haiku
elif check_define __FreeBSD__ ; then
- targetos='FreeBSD'
+ targetos=freebsd
elif check_define __FreeBSD_kernel__ && check_define __GLIBC__; then
- targetos='GNU/kFreeBSD'
+ targetos=gnu/kfreebsd
elif check_define __DragonFly__ ; then
- targetos='DragonFly'
+ targetos=dragonfly
elif check_define __NetBSD__; then
- targetos='NetBSD'
+ targetos=netbsd
elif check_define __APPLE__; then
- targetos='Darwin'
+ targetos=darwin
else
# This is a fatal error, but don't report it yet, because we
# might be going to just print the --help text, or it might
# be the result of a missing compiler.
- targetos='bogus'
+ targetos=bogus
fi
# Some host OSes need non-standard checks for which CPU to use.
@@ -532,7 +532,7 @@ fi
# cross-compiling to one of these OSes then you'll need to specify
# the correct CPU with the --cpu option.
case $targetos in
-SunOS)
+sunos)
# $(uname -m) returns i86pc even on an x86_64 box, so default based on isainfo
if test -z "$cpu" && test "$(isainfo -k)" = "amd64"; then
cpu="x86_64"
@@ -623,40 +623,40 @@ fi
# OS specific
case $targetos in
-MINGW32*)
+windows)
mingw32="yes"
plugins="no"
pie="no"
;;
-GNU/kFreeBSD)
+gnu/kfreebsd)
bsd="yes"
;;
-FreeBSD)
+freebsd)
bsd="yes"
bsd_user="yes"
make="${MAKE-gmake}"
# needed for kinfo_getvmmap(3) in libutil.h
;;
-DragonFly)
+dragonfly)
bsd="yes"
make="${MAKE-gmake}"
;;
-NetBSD)
+netbsd)
bsd="yes"
make="${MAKE-gmake}"
;;
-OpenBSD)
+openbsd)
bsd="yes"
make="${MAKE-gmake}"
;;
-Darwin)
+darwin)
bsd="yes"
darwin="yes"
# Disable attempts to use ObjectiveC features in os/object.h since they
# won't work when we're compiling with gcc as a C compiler.
QEMU_CFLAGS="-DOS_OBJECT_USE_OBJC=0 $QEMU_CFLAGS"
;;
-SunOS)
+sunos)
solaris="yes"
make="${MAKE-gmake}"
smbd="${SMBD-/usr/sfw/sbin/smbd}"
@@ -665,11 +665,11 @@ SunOS)
# needed for TIOCWIN* defines in termios.h
QEMU_CFLAGS="-D__EXTENSIONS__ $QEMU_CFLAGS"
;;
-Haiku)
+haiku)
pie="no"
QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE -fPIC $QEMU_CFLAGS"
;;
-Linux)
+linux)
linux="yes"
linux_user="yes"
vhost_user=${default_feature:-yes}
@@ -3334,8 +3334,8 @@ QEMU_GA_MSI_MINGW_DLL_PATH="$($pkg_config --variable=prefix glib-2.0)/bin"
# Mac OS X ships with a broken assembler
roms=
if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \
- test "$targetos" != "Darwin" && test "$targetos" != "SunOS" && \
- test "$targetos" != "Haiku" && test "$softmmu" = yes ; then
+ test "$targetos" != "darwin" && test "$targetos" != "sunos" && \
+ test "$targetos" != "haiku" && test "$softmmu" = yes ; then
# Different host OS linkers have different ideas about the name of the ELF
# emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd
# variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe.
@@ -3903,15 +3903,7 @@ if test "$skip_meson" = no; then
if test "$cross_compile" = "yes"; then
cross_arg="--cross-file config-meson.cross"
echo "[host_machine]" >> $cross
- if test "$mingw32" = "yes" ; then
- echo "system = 'windows'" >> $cross
- fi
- if test "$linux" = "yes" ; then
- echo "system = 'linux'" >> $cross
- fi
- if test "$darwin" = "yes" ; then
- echo "system = 'darwin'" >> $cross
- fi
+ echo "system = '$targetos'" >> $cross
case "$ARCH" in
i386)
echo "cpu_family = 'x86'" >> $cross