version 1.1.1.17, 2018/04/24 19:17:17
|
version 1.1.1.18, 2018/04/24 19:34:28
|
Line 20 TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-
|
Line 20 TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-
|
trap "rm -f $TMPC $TMPO $TMPE" EXIT INT QUIT TERM |
trap "rm -f $TMPC $TMPO $TMPE" EXIT INT QUIT TERM |
rm -f config.log |
rm -f config.log |
|
|
|
# Print a helpful header at the top of config.log |
|
echo "# QEMU configure log $(date)" >> config.log |
|
printf "# Configured with:" >> config.log |
|
printf " '%s'" "$0" "$@" >> config.log |
|
echo >> config.log |
|
echo "#" >> config.log |
|
|
compile_object() { |
compile_object() { |
echo $cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log |
echo $cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log |
$cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log 2>&1 |
$cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log 2>&1 |
Line 34 compile_prog() {
|
Line 41 compile_prog() {
|
|
|
# symbolically link $1 to $2. Portable version of "ln -sf". |
# symbolically link $1 to $2. Portable version of "ln -sf". |
symlink() { |
symlink() { |
rm -f $2 |
rm -rf "$2" |
ln -s $1 $2 |
ln -s "$1" "$2" |
} |
} |
|
|
# check whether a command is available to this shell (may be either an |
# check whether a command is available to this shell (may be either an |
Line 93 audio_pt_int=""
|
Line 100 audio_pt_int=""
|
audio_win_int="" |
audio_win_int="" |
cc_i386=i386-pc-linux-gnu-gcc |
cc_i386=i386-pc-linux-gnu-gcc |
libs_qga="" |
libs_qga="" |
|
debug_info="yes" |
|
|
target_list="" |
target_list="" |
|
|
Line 116 docs=""
|
Line 124 docs=""
|
fdt="" |
fdt="" |
nptl="" |
nptl="" |
sdl="" |
sdl="" |
|
virtfs="" |
vnc="yes" |
vnc="yes" |
sparse="no" |
sparse="no" |
uuid="" |
uuid="" |
Line 128 vnc_thread="no"
|
Line 137 vnc_thread="no"
|
xen="" |
xen="" |
xen_ctrl_version="" |
xen_ctrl_version="" |
linux_aio="" |
linux_aio="" |
|
cap_ng="" |
attr="" |
attr="" |
libattr="" |
libattr="" |
xfs="" |
xfs="" |
Line 145 mingw32="no"
|
Line 155 mingw32="no"
|
EXESUF="" |
EXESUF="" |
prefix="/usr/local" |
prefix="/usr/local" |
mandir="\${prefix}/share/man" |
mandir="\${prefix}/share/man" |
datadir="\${prefix}/share/qemu" |
datadir="\${prefix}/share" |
docdir="\${prefix}/share/doc/qemu" |
qemu_docdir="\${prefix}/share/doc/qemu" |
bindir="\${prefix}/bin" |
bindir="\${prefix}/bin" |
libdir="\${prefix}/lib" |
libdir="\${prefix}/lib" |
includedir="\${prefix}/include" |
includedir="\${prefix}/include" |
Line 163 profiler="no"
|
Line 173 profiler="no"
|
cocoa="no" |
cocoa="no" |
softmmu="yes" |
softmmu="yes" |
linux_user="no" |
linux_user="no" |
darwin_user="no" |
|
bsd_user="no" |
bsd_user="no" |
guest_base="" |
guest_base="" |
uname_release="" |
uname_release="" |
Line 171 mixemu="no"
|
Line 180 mixemu="no"
|
aix="no" |
aix="no" |
blobs="yes" |
blobs="yes" |
pkgversion="" |
pkgversion="" |
check_utests="" |
|
pie="" |
pie="" |
zero_malloc="" |
zero_malloc="" |
trace_backend="nop" |
trace_backend="nop" |
Line 185 opengl=""
|
Line 193 opengl=""
|
zlib="yes" |
zlib="yes" |
guest_agent="yes" |
guest_agent="yes" |
libiscsi="" |
libiscsi="" |
|
coroutine="" |
|
|
# parse CC options first |
# parse CC options first |
for opt do |
for opt do |
Line 202 for opt do
|
Line 211 for opt do
|
;; |
;; |
--extra-ldflags=*) LDFLAGS="$optarg $LDFLAGS" |
--extra-ldflags=*) LDFLAGS="$optarg $LDFLAGS" |
;; |
;; |
|
--enable-debug-info) debug_info="yes" |
|
;; |
|
--disable-debug-info) debug_info="no" |
|
;; |
--sparc_cpu=*) |
--sparc_cpu=*) |
sparc_cpu="$optarg" |
sparc_cpu="$optarg" |
case $sparc_cpu in |
case $sparc_cpu in |
Line 221 for opt do
|
Line 234 for opt do
|
done |
done |
# OS specific |
# OS specific |
# Using uname is really, really broken. Once we have the right set of checks |
# Using uname is really, really broken. Once we have the right set of checks |
# we can eliminate it's usage altogether |
# we can eliminate its usage altogether. |
|
|
cc="${CC-${cross_prefix}gcc}" |
cc="${CC-${cross_prefix}gcc}" |
ar="${AR-${cross_prefix}ar}" |
ar="${AR-${cross_prefix}ar}" |
Line 230 ld="${LD-${cross_prefix}ld}"
|
Line 243 ld="${LD-${cross_prefix}ld}"
|
libtool="${LIBTOOL-${cross_prefix}libtool}" |
libtool="${LIBTOOL-${cross_prefix}libtool}" |
strip="${STRIP-${cross_prefix}strip}" |
strip="${STRIP-${cross_prefix}strip}" |
windres="${WINDRES-${cross_prefix}windres}" |
windres="${WINDRES-${cross_prefix}windres}" |
pkg_config="${PKG_CONFIG-${cross_prefix}pkg-config}" |
pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}" |
|
query_pkg_config() { |
|
"${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@" |
|
} |
|
pkg_config=query_pkg_config |
sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}" |
sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}" |
|
|
# default flags for all hosts |
# default flags for all hosts |
QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS" |
QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS" |
CFLAGS="-g $CFLAGS" |
|
QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS" |
QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS" |
QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" |
QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" |
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS" |
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS" |
QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS" |
QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS" |
QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/fpu" |
QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/fpu" |
LDFLAGS="-g $LDFLAGS" |
if test "$debug_info" = "yes"; then |
|
CFLAGS="-g $CFLAGS" |
|
LDFLAGS="-g $LDFLAGS" |
|
fi |
|
|
# make source path absolute |
# make source path absolute |
source_path=`cd "$source_path"; pwd` |
source_path=`cd "$source_path"; pwd` |
Line 249 source_path=`cd "$source_path"; pwd`
|
Line 268 source_path=`cd "$source_path"; pwd`
|
check_define() { |
check_define() { |
cat > $TMPC <<EOF |
cat > $TMPC <<EOF |
#if !defined($1) |
#if !defined($1) |
#error Not defined |
#error $1 not defined |
#endif |
#endif |
int main(void) { return 0; } |
int main(void) { return 0; } |
EOF |
EOF |
Line 287 elif check_define __s390__ ; then
|
Line 306 elif check_define __s390__ ; then
|
else |
else |
cpu="s390" |
cpu="s390" |
fi |
fi |
elif check_define __ARMEB__ ; then |
elif check_define __arm__ ; then |
cpu="armv4b" |
cpu="arm" |
elif check_define __ARMEL__ ; then |
|
cpu="armv4l" |
|
elif check_define __hppa__ ; then |
elif check_define __hppa__ ; then |
cpu="hppa" |
cpu="hppa" |
else |
else |
cpu=`uname -m` |
cpu=`uname -m` |
fi |
fi |
|
|
|
ARCH= |
|
# Normalise host CPU name and set ARCH. |
|
# Note that this case should only have supported host CPUs, not guests. |
case "$cpu" in |
case "$cpu" in |
alpha|cris|ia64|lm32|m68k|microblaze|ppc|ppc64|sparc64|unicore32) |
ia64|ppc|ppc64|s390|s390x|sparc64) |
cpu="$cpu" |
cpu="$cpu" |
;; |
;; |
i386|i486|i586|i686|i86pc|BePC) |
i386|i486|i586|i686|i86pc|BePC) |
Line 307 case "$cpu" in
|
Line 327 case "$cpu" in
|
x86_64|amd64) |
x86_64|amd64) |
cpu="x86_64" |
cpu="x86_64" |
;; |
;; |
armv*b) |
armv*b|armv*l|arm) |
cpu="armv4b" |
cpu="arm" |
;; |
|
armv*l) |
|
cpu="armv4l" |
|
;; |
;; |
hppa|parisc|parisc64) |
hppa|parisc|parisc64) |
cpu="hppa" |
cpu="hppa" |
Line 319 case "$cpu" in
|
Line 336 case "$cpu" in
|
mips*) |
mips*) |
cpu="mips" |
cpu="mips" |
;; |
;; |
s390) |
|
cpu="s390" |
|
;; |
|
s390x) |
|
cpu="s390x" |
|
;; |
|
sparc|sun4[cdmuv]) |
sparc|sun4[cdmuv]) |
cpu="sparc" |
cpu="sparc" |
;; |
;; |
*) |
*) |
echo "Unsupported CPU = $cpu" |
# This will result in either an error or falling back to TCI later |
exit 1 |
ARCH=unknown |
;; |
;; |
esac |
esac |
|
if test -z "$ARCH"; then |
|
ARCH="$cpu" |
|
fi |
|
|
# OS specific |
# OS specific |
if check_define __linux__ ; then |
if check_define __linux__ ; then |
Line 409 Darwin)
|
Line 423 Darwin)
|
else |
else |
QEMU_CFLAGS="-mdynamic-no-pic $QEMU_CFLAGS" |
QEMU_CFLAGS="-mdynamic-no-pic $QEMU_CFLAGS" |
fi |
fi |
darwin_user="yes" |
|
cocoa="yes" |
cocoa="yes" |
audio_drv_list="coreaudio" |
audio_drv_list="coreaudio" |
audio_possible_drivers="coreaudio sdl fmod" |
audio_possible_drivers="coreaudio sdl fmod" |
Line 455 SunOS)
|
Line 468 SunOS)
|
# needed for TIOCWIN* defines in termios.h |
# needed for TIOCWIN* defines in termios.h |
QEMU_CFLAGS="-D__EXTENSIONS__ $QEMU_CFLAGS" |
QEMU_CFLAGS="-D__EXTENSIONS__ $QEMU_CFLAGS" |
QEMU_CFLAGS="-std=gnu99 $QEMU_CFLAGS" |
QEMU_CFLAGS="-std=gnu99 $QEMU_CFLAGS" |
LIBS="-lsocket -lnsl -lresolv $LIBS" |
solarisnetlibs="-lsocket -lnsl -lresolv" |
|
LIBS="$solarisnetlibs $LIBS" |
|
libs_qga="$solarisnetlibs $libs_qga" |
;; |
;; |
AIX) |
AIX) |
aix="yes" |
aix="yes" |
Line 483 esac
|
Line 498 esac
|
if [ "$bsd" = "yes" ] ; then |
if [ "$bsd" = "yes" ] ; then |
if [ "$darwin" != "yes" ] ; then |
if [ "$darwin" != "yes" ] ; then |
usb="bsd" |
usb="bsd" |
|
bsd_user="yes" |
fi |
fi |
bsd_user="yes" |
|
fi |
fi |
|
|
: ${make=${MAKE-make}} |
: ${make=${MAKE-make}} |
Line 497 if test "$mingw32" = "yes" ; then
|
Line 512 if test "$mingw32" = "yes" ; then
|
QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS" |
QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS" |
# enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) |
# enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) |
QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS" |
QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS" |
LIBS="-lwinmm -lws2_32 -liberty -liphlpapi $LIBS" |
LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS" |
prefix="c:/Program Files/Qemu" |
cat > $TMPC << EOF |
|
int main(void) { return 0; } |
|
EOF |
|
if compile_prog "" "-liberty" ; then |
|
LIBS="-liberty $LIBS" |
|
fi |
|
prefix="c:/Program Files/QEMU" |
mandir="\${prefix}" |
mandir="\${prefix}" |
datadir="\${prefix}" |
datadir="\${prefix}" |
docdir="\${prefix}" |
qemu_docdir="\${prefix}" |
bindir="\${prefix}" |
bindir="\${prefix}" |
sysconfdir="\${prefix}" |
sysconfdir="\${prefix}" |
confsuffix="" |
confsuffix="" |
guest_agent="no" |
libs_qga="-lws2_32 -lwinmm -lpowrprof $libs_qga" |
fi |
fi |
|
|
werror="" |
werror="" |
Line 541 for opt do
|
Line 562 for opt do
|
;; |
;; |
--extra-ldflags=*) |
--extra-ldflags=*) |
;; |
;; |
|
--enable-debug-info) |
|
;; |
|
--disable-debug-info) |
|
;; |
--cpu=*) |
--cpu=*) |
;; |
;; |
--target-list=*) target_list="$optarg" |
--target-list=*) target_list="$optarg" |
Line 554 for opt do
|
Line 579 for opt do
|
--static) |
--static) |
static="yes" |
static="yes" |
LDFLAGS="-static $LDFLAGS" |
LDFLAGS="-static $LDFLAGS" |
|
QEMU_PKG_CONFIG_FLAGS="--static $QEMU_PKG_CONFIG_FLAGS" |
;; |
;; |
--mandir=*) mandir="$optarg" |
--mandir=*) mandir="$optarg" |
;; |
;; |
Line 565 for opt do
|
Line 591 for opt do
|
;; |
;; |
--datadir=*) datadir="$optarg" |
--datadir=*) datadir="$optarg" |
;; |
;; |
--docdir=*) docdir="$optarg" |
--with-confsuffix=*) confsuffix="$optarg" |
|
;; |
|
--docdir=*) qemu_docdir="$optarg" |
;; |
;; |
--sysconfdir=*) sysconfdir="$optarg" |
--sysconfdir=*) sysconfdir="$optarg" |
;; |
;; |
Line 581 for opt do
|
Line 609 for opt do
|
;; |
;; |
--enable-sdl) sdl="yes" |
--enable-sdl) sdl="yes" |
;; |
;; |
|
--disable-virtfs) virtfs="no" |
|
;; |
|
--enable-virtfs) virtfs="yes" |
|
;; |
--disable-vnc) vnc="no" |
--disable-vnc) vnc="no" |
;; |
;; |
--enable-vnc) vnc="yes" |
--enable-vnc) vnc="yes" |
Line 668 for opt do
|
Line 700 for opt do
|
;; |
;; |
--enable-tcg-interpreter) tcg_interpreter="yes" |
--enable-tcg-interpreter) tcg_interpreter="yes" |
;; |
;; |
|
--disable-cap-ng) cap_ng="no" |
|
;; |
|
--enable-cap-ng) cap_ng="yes" |
|
;; |
--disable-spice) spice="no" |
--disable-spice) spice="no" |
;; |
;; |
--enable-spice) spice="yes" |
--enable-spice) spice="yes" |
Line 678 for opt do
|
Line 714 for opt do
|
;; |
;; |
--enable-profiler) profiler="yes" |
--enable-profiler) profiler="yes" |
;; |
;; |
|
--disable-cocoa) cocoa="no" |
|
;; |
--enable-cocoa) |
--enable-cocoa) |
cocoa="yes" ; |
cocoa="yes" ; |
sdl="no" ; |
sdl="no" ; |
Line 690 for opt do
|
Line 728 for opt do
|
--disable-user) |
--disable-user) |
linux_user="no" ; |
linux_user="no" ; |
bsd_user="no" ; |
bsd_user="no" ; |
darwin_user="no" |
|
;; |
;; |
--enable-user) ;; |
--enable-user) ;; |
--disable-linux-user) linux_user="no" |
--disable-linux-user) linux_user="no" |
;; |
;; |
--enable-linux-user) linux_user="yes" |
--enable-linux-user) linux_user="yes" |
;; |
;; |
--disable-darwin-user) darwin_user="no" |
|
;; |
|
--enable-darwin-user) darwin_user="yes" |
|
;; |
|
--disable-bsd-user) bsd_user="no" |
--disable-bsd-user) bsd_user="no" |
;; |
;; |
--enable-bsd-user) bsd_user="yes" |
--enable-bsd-user) bsd_user="yes" |
Line 733 for opt do
|
Line 766 for opt do
|
;; |
;; |
--enable-fdt) fdt="yes" |
--enable-fdt) fdt="yes" |
;; |
;; |
--disable-check-utests) check_utests="no" |
|
;; |
|
--enable-check-utests) check_utests="yes" |
|
;; |
|
--disable-nptl) nptl="no" |
--disable-nptl) nptl="no" |
;; |
;; |
--enable-nptl) nptl="yes" |
--enable-nptl) nptl="yes" |
Line 755 for opt do
|
Line 784 for opt do
|
;; |
;; |
--with-pkgversion=*) pkgversion=" ($optarg)" |
--with-pkgversion=*) pkgversion=" ($optarg)" |
;; |
;; |
|
--with-coroutine=*) coroutine="$optarg" |
|
;; |
--disable-docs) docs="no" |
--disable-docs) docs="no" |
;; |
;; |
--enable-docs) docs="yes" |
--enable-docs) docs="yes" |
Line 771 for opt do
|
Line 802 for opt do
|
;; |
;; |
--enable-rbd) rbd="yes" |
--enable-rbd) rbd="yes" |
;; |
;; |
|
--disable-xfsctl) xfs="no" |
|
;; |
|
--enable-xfsctl) xfs="yes" |
|
;; |
--disable-smartcard) smartcard="no" |
--disable-smartcard) smartcard="no" |
;; |
;; |
--enable-smartcard) smartcard="yes" |
--enable-smartcard) smartcard="yes" |
Line 927 unicore32-linux-user \
|
Line 962 unicore32-linux-user \
|
s390x-linux-user \ |
s390x-linux-user \ |
" |
" |
fi |
fi |
# the following are Darwin specific |
|
if [ "$darwin_user" = "yes" ] ; then |
|
default_target_list="$default_target_list i386-darwin-user ppc-darwin-user " |
|
fi |
|
# the following are BSD specific |
# the following are BSD specific |
if [ "$bsd_user" = "yes" ] ; then |
if [ "$bsd_user" = "yes" ] ; then |
default_target_list="${default_target_list}\ |
default_target_list="${default_target_list}\ |
Line 971 echo " --python=PYTHON use spe
|
Line 1002 echo " --python=PYTHON use spe
|
echo " --smbd=SMBD use specified smbd [$smbd]" |
echo " --smbd=SMBD use specified smbd [$smbd]" |
echo " --static enable static build [$static]" |
echo " --static enable static build [$static]" |
echo " --mandir=PATH install man pages in PATH" |
echo " --mandir=PATH install man pages in PATH" |
echo " --datadir=PATH install firmware in PATH" |
echo " --datadir=PATH install firmware in PATH$confsuffix" |
echo " --docdir=PATH install documentation in PATH" |
echo " --docdir=PATH install documentation in PATH$confsuffix" |
echo " --bindir=PATH install binaries in PATH" |
echo " --bindir=PATH install binaries in PATH" |
echo " --sysconfdir=PATH install config in PATH/qemu" |
echo " --sysconfdir=PATH install config in PATH$confsuffix" |
|
echo " --with-confsuffix=SUFFIX suffix for QEMU data inside datadir and sysconfdir [$confsuffix]" |
echo " --enable-debug-tcg enable TCG debugging" |
echo " --enable-debug-tcg enable TCG debugging" |
echo " --disable-debug-tcg disable TCG debugging (default)" |
echo " --disable-debug-tcg disable TCG debugging (default)" |
echo " --enable-debug enable common debug build options" |
echo " --enable-debug enable common debug build options" |
Line 984 echo " --disable-strip disable
|
Line 1016 echo " --disable-strip disable
|
echo " --disable-werror disable compilation abort on warning" |
echo " --disable-werror disable compilation abort on warning" |
echo " --disable-sdl disable SDL" |
echo " --disable-sdl disable SDL" |
echo " --enable-sdl enable SDL" |
echo " --enable-sdl enable SDL" |
|
echo " --disable-virtfs disable VirtFS" |
|
echo " --enable-virtfs enable VirtFS" |
echo " --disable-vnc disable VNC" |
echo " --disable-vnc disable VNC" |
echo " --enable-vnc enable VNC" |
echo " --enable-vnc enable VNC" |
echo " --enable-cocoa enable COCOA (Mac OS X only)" |
echo " --disable-cocoa disable Cocoa (Mac OS X only)" |
|
echo " --enable-cocoa enable Cocoa (default on Mac OS X)" |
echo " --audio-drv-list=LIST set audio drivers list:" |
echo " --audio-drv-list=LIST set audio drivers list:" |
echo " Available drivers: $audio_possible_drivers" |
echo " Available drivers: $audio_possible_drivers" |
echo " --audio-card-list=LIST set list of emulated audio cards [$audio_card_list]" |
echo " --audio-card-list=LIST set list of emulated audio cards [$audio_card_list]" |
Line 1014 echo " --disable-curl disable
|
Line 1049 echo " --disable-curl disable
|
echo " --enable-curl enable curl connectivity" |
echo " --enable-curl enable curl connectivity" |
echo " --disable-fdt disable fdt device tree" |
echo " --disable-fdt disable fdt device tree" |
echo " --enable-fdt enable fdt device tree" |
echo " --enable-fdt enable fdt device tree" |
echo " --disable-check-utests disable check unit-tests" |
|
echo " --enable-check-utests enable check unit-tests" |
|
echo " --disable-bluez disable bluez stack connectivity" |
echo " --disable-bluez disable bluez stack connectivity" |
echo " --enable-bluez enable bluez stack connectivity" |
echo " --enable-bluez enable bluez stack connectivity" |
echo " --disable-slirp disable SLIRP userspace network connectivity" |
echo " --disable-slirp disable SLIRP userspace network connectivity" |
Line 1030 echo " --enable-user enable
|
Line 1063 echo " --enable-user enable
|
echo " --disable-user disable all user emulation targets" |
echo " --disable-user disable all user emulation targets" |
echo " --enable-linux-user enable all linux usermode emulation targets" |
echo " --enable-linux-user enable all linux usermode emulation targets" |
echo " --disable-linux-user disable all linux usermode emulation targets" |
echo " --disable-linux-user disable all linux usermode emulation targets" |
echo " --enable-darwin-user enable all darwin usermode emulation targets" |
|
echo " --disable-darwin-user disable all darwin usermode emulation targets" |
|
echo " --enable-bsd-user enable all BSD usermode emulation targets" |
echo " --enable-bsd-user enable all BSD usermode emulation targets" |
echo " --disable-bsd-user disable all BSD usermode emulation targets" |
echo " --disable-bsd-user disable all BSD usermode emulation targets" |
echo " --enable-guest-base enable GUEST_BASE support for usermode" |
echo " --enable-guest-base enable GUEST_BASE support for usermode" |
Line 1051 echo " --disable-vde disable
|
Line 1082 echo " --disable-vde disable
|
echo " --enable-vde enable support for vde network" |
echo " --enable-vde enable support for vde network" |
echo " --disable-linux-aio disable Linux AIO support" |
echo " --disable-linux-aio disable Linux AIO support" |
echo " --enable-linux-aio enable Linux AIO support" |
echo " --enable-linux-aio enable Linux AIO support" |
|
echo " --disable-cap-ng disable libcap-ng support" |
|
echo " --enable-cap-ng enable libcap-ng support" |
echo " --disable-attr disables attr and xattr support" |
echo " --disable-attr disables attr and xattr support" |
echo " --enable-attr enable attr and xattr support" |
echo " --enable-attr enable attr and xattr support" |
echo " --disable-blobs disable installing provided firmware blobs" |
echo " --disable-blobs disable installing provided firmware blobs" |
Line 1059 echo " --disable-docs disable
|
Line 1092 echo " --disable-docs disable
|
echo " --disable-vhost-net disable vhost-net acceleration support" |
echo " --disable-vhost-net disable vhost-net acceleration support" |
echo " --enable-vhost-net enable vhost-net acceleration support" |
echo " --enable-vhost-net enable vhost-net acceleration support" |
echo " --enable-trace-backend=B Set trace backend" |
echo " --enable-trace-backend=B Set trace backend" |
echo " Available backends:" $("$source_path"/scripts/tracetool --list-backends) |
echo " Available backends:" $($python "$source_path"/scripts/tracetool.py --list-backends) |
echo " --with-trace-file=NAME Full PATH,NAME of file to store traces" |
echo " --with-trace-file=NAME Full PATH,NAME of file to store traces" |
echo " Default:trace-<pid>" |
echo " Default:trace-<pid>" |
echo " --disable-spice disable spice" |
echo " --disable-spice disable spice" |
Line 1075 echo " --disable-usb-redir disable
|
Line 1108 echo " --disable-usb-redir disable
|
echo " --enable-usb-redir enable usb network redirection support" |
echo " --enable-usb-redir enable usb network redirection support" |
echo " --disable-guest-agent disable building of the QEMU Guest Agent" |
echo " --disable-guest-agent disable building of the QEMU Guest Agent" |
echo " --enable-guest-agent enable building of the QEMU Guest Agent" |
echo " --enable-guest-agent enable building of the QEMU Guest Agent" |
|
echo " --with-coroutine=BACKEND coroutine backend. Supported options:" |
|
echo " gthread, ucontext, sigaltstack, windows" |
echo "" |
echo "" |
echo "NOTE: The object files are built at the place where configure is launched" |
echo "NOTE: The object files are built at the place where configure is launched" |
exit 1 |
exit 1 |
fi |
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. |
# check that the C compiler works. |
cat > $TMPC <<EOF |
cat > $TMPC <<EOF |
int main(void) {} |
int main(void) { return 0; } |
EOF |
EOF |
|
|
if compile_object ; then |
if compile_object ; then |
Line 1100 cat > $TMPC << EOF
|
Line 1147 cat > $TMPC << EOF
|
int main(void) { return 0; } |
int main(void) { return 0; } |
EOF |
EOF |
for flag in $gcc_flags; do |
for flag in $gcc_flags; do |
if compile_prog "$flag -Werror" "" ; then |
if compile_prog "-Werror $flag" "" ; then |
QEMU_CFLAGS="$QEMU_CFLAGS $flag" |
QEMU_CFLAGS="$QEMU_CFLAGS $flag" |
fi |
fi |
done |
done |
Line 1185 if test "$solaris" = "yes" ; then
|
Line 1232 if test "$solaris" = "yes" ; then
|
fi |
fi |
fi |
fi |
|
|
if test "$guest_agent" != "no" ; then |
if ! has $python; then |
if has $python; then |
echo "Python not found. Use --python=/path/to/python" |
: |
exit 1 |
else |
fi |
echo "Python not found. Use --python=/path/to/python" |
|
exit 1 |
# Note that if the Python conditional here evaluates True we will exit |
fi |
# with status 1 which is a shell 'false' value. |
|
if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_info >= (3,))'; then |
|
echo "Cannot use '$python', Python 2.4 or later is required." |
|
echo "Note that Python 3 or later is not yet supported." |
|
echo "Use --python=/path/to/python to specify a supported Python." |
|
exit 1 |
fi |
fi |
|
|
if test -z "$target_list" ; then |
if test -z "$target_list" ; then |
Line 1243 else
|
Line 1295 else
|
|
|
# if cross compiling, cannot launch a program, so make a static guess |
# if cross compiling, cannot launch a program, so make a static guess |
case "$cpu" in |
case "$cpu" in |
armv4b|hppa|m68k|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64) |
arm) |
|
# ARM can be either way; ask the compiler which one we are |
|
if check_define __ARMEB__; then |
|
bigendian=yes |
|
fi |
|
;; |
|
hppa|m68k|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64) |
bigendian=yes |
bigendian=yes |
;; |
;; |
esac |
esac |
|
|
fi |
fi |
|
|
# host long bits test, actually a pointer size test |
|
cat > $TMPC << EOF |
|
int sizeof_pointer_is_8[sizeof(void *) == 8 ? 1 : -1]; |
|
EOF |
|
if compile_object; then |
|
hostlongbits=64 |
|
else |
|
hostlongbits=32 |
|
fi |
|
|
|
|
|
########################################## |
########################################## |
# NPTL probe |
# NPTL probe |
|
|
Line 1268 if test "$nptl" != "no" ; then
|
Line 1315 if test "$nptl" != "no" ; then
|
cat > $TMPC <<EOF |
cat > $TMPC <<EOF |
#include <sched.h> |
#include <sched.h> |
#include <linux/futex.h> |
#include <linux/futex.h> |
void foo() |
int main(void) { |
{ |
|
#if !defined(CLONE_SETTLS) || !defined(FUTEX_WAIT) |
#if !defined(CLONE_SETTLS) || !defined(FUTEX_WAIT) |
#error bork |
#error bork |
#endif |
#endif |
|
return 0; |
} |
} |
EOF |
EOF |
|
|
Line 1311 fi
|
Line 1358 fi
|
if test "$xen" != "no" ; then |
if test "$xen" != "no" ; then |
xen_libs="-lxenstore -lxenctrl -lxenguest" |
xen_libs="-lxenstore -lxenctrl -lxenguest" |
|
|
# Xen unstable |
# First we test whether Xen headers and libraries are available. |
|
# If no, we are done and there is no Xen support. |
|
# If yes, more tests are run to detect the Xen version. |
|
|
|
# Xen (any) |
cat > $TMPC <<EOF |
cat > $TMPC <<EOF |
#include <xenctrl.h> |
#include <xenctrl.h> |
#include <xs.h> |
#include <xs.h> |
|
int main(void) { |
|
return 0; |
|
} |
|
EOF |
|
if ! compile_prog "" "$xen_libs" ; then |
|
# Xen not found |
|
if test "$xen" = "yes" ; then |
|
feature_not_found "xen" |
|
fi |
|
xen=no |
|
|
|
# Xen unstable |
|
elif ( |
|
cat > $TMPC <<EOF |
|
#include <xenctrl.h> |
|
#include <xs.h> |
|
#include <stdint.h> |
|
#include <xen/hvm/hvm_info_table.h> |
|
#if !defined(HVM_MAX_VCPUS) |
|
# error HVM_MAX_VCPUS not defined |
|
#endif |
|
int main(void) { |
|
xc_interface *xc; |
|
xs_daemon_open(); |
|
xc = xc_interface_open(0, 0, 0); |
|
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); |
|
xc_gnttab_open(NULL, 0); |
|
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); |
|
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); |
|
return 0; |
|
} |
|
EOF |
|
compile_prog "" "$xen_libs" |
|
) ; then |
|
xen_ctrl_version=420 |
|
xen=yes |
|
|
|
elif ( |
|
cat > $TMPC <<EOF |
|
#include <xenctrl.h> |
|
#include <xs.h> |
#include <stdint.h> |
#include <stdint.h> |
#include <xen/hvm/hvm_info_table.h> |
#include <xen/hvm/hvm_info_table.h> |
#if !defined(HVM_MAX_VCPUS) |
#if !defined(HVM_MAX_VCPUS) |
Line 1330 int main(void) {
|
Line 1422 int main(void) {
|
return 0; |
return 0; |
} |
} |
EOF |
EOF |
if compile_prog "" "$xen_libs" ; then |
compile_prog "" "$xen_libs" |
|
) ; then |
xen_ctrl_version=410 |
xen_ctrl_version=410 |
xen=yes |
xen=yes |
|
|
Line 1401 EOF
|
Line 1494 EOF
|
xen_ctrl_version=330 |
xen_ctrl_version=330 |
xen=yes |
xen=yes |
|
|
# Xen not found or unsupported |
# Xen version unsupported |
else |
else |
if test "$xen" = "yes" ; then |
if test "$xen" = "yes" ; then |
feature_not_found "xen" |
feature_not_found "xen (unsupported version)" |
fi |
fi |
xen=no |
xen=no |
fi |
fi |
Line 1417 fi
|
Line 1510 fi
|
########################################## |
########################################## |
# pkg-config probe |
# pkg-config probe |
|
|
if ! has $pkg_config; then |
if ! has "$pkg_config_exe"; then |
echo "Error: pkg-config binary '$pkg_config' not found" |
echo "Error: pkg-config binary '$pkg_config_exe' not found" |
exit 1 |
exit 1 |
fi |
fi |
|
|
Line 1522 EOF
|
Line 1615 EOF
|
if compile_prog "$sdl_cflags" "$sdl_libs" ; then |
if compile_prog "$sdl_cflags" "$sdl_libs" ; then |
sdl_libs="$sdl_libs -lX11" |
sdl_libs="$sdl_libs -lX11" |
fi |
fi |
if test "$mingw32" = "yes" ; then |
|
sdl_libs="`echo $sdl_libs | sed s/-mwindows//g` -mconsole" |
|
fi |
|
libs_softmmu="$sdl_libs $libs_softmmu" |
libs_softmmu="$sdl_libs $libs_softmmu" |
fi |
fi |
|
|
Line 1667 fi
|
Line 1757 fi
|
# xfsctl() probe, used for raw-posix |
# xfsctl() probe, used for raw-posix |
if test "$xfs" != "no" ; then |
if test "$xfs" != "no" ; then |
cat > $TMPC << EOF |
cat > $TMPC << EOF |
|
#include <stddef.h> /* NULL */ |
#include <xfs/xfs.h> |
#include <xfs/xfs.h> |
int main(void) |
int main(void) |
{ |
{ |
Line 1710 EOF
|
Line 1801 EOF
|
fi |
fi |
|
|
########################################## |
########################################## |
|
# libcap-ng library probe |
|
if test "$cap_ng" != "no" ; then |
|
cap_libs="-lcap-ng" |
|
cat > $TMPC << EOF |
|
#include <cap-ng.h> |
|
int main(void) |
|
{ |
|
capng_capability_to_name(CAPNG_EFFECTIVE); |
|
return 0; |
|
} |
|
EOF |
|
if compile_prog "" "$cap_libs" ; then |
|
cap_ng=yes |
|
libs_tools="$cap_libs $libs_tools" |
|
else |
|
if test "$cap_ng" = "yes" ; then |
|
feature_not_found "cap_ng" |
|
fi |
|
cap_ng=no |
|
fi |
|
fi |
|
|
|
########################################## |
# Sound support libraries probe |
# Sound support libraries probe |
|
|
audio_drv_probe() |
audio_drv_probe() |
Line 1762 for drv in $audio_drv_list; do
|
Line 1876 for drv in $audio_drv_list; do
|
;; |
;; |
|
|
pa) |
pa) |
audio_drv_probe $drv pulse/simple.h "-lpulse-simple -lpulse" \ |
audio_drv_probe $drv pulse/mainloop.h "-lpulse" \ |
"pa_simple *s = 0; pa_simple_free(s); return 0;" |
"pa_mainloop *m = 0; pa_mainloop_free (m); return 0;" |
libs_softmmu="-lpulse -lpulse-simple $libs_softmmu" |
libs_softmmu="-lpulse $libs_softmmu" |
audio_pt_int="yes" |
audio_pt_int="yes" |
;; |
;; |
|
|
Line 1835 if test "$curses" != "no" ; then
|
Line 1949 if test "$curses" != "no" ; then
|
curses_found=no |
curses_found=no |
cat > $TMPC << EOF |
cat > $TMPC << EOF |
#include <curses.h> |
#include <curses.h> |
#ifdef __OpenBSD__ |
int main(void) { |
#define resize_term resizeterm |
const char *s = curses_version(); |
#endif |
resize_term(0, 0); |
int main(void) { resize_term(0, 0); return curses_version(); } |
return s != 0; |
|
} |
EOF |
EOF |
for curses_lib in $curses_list; do |
for curses_lib in $curses_list; do |
if compile_prog "" "$curses_lib" ; then |
if compile_prog "" "$curses_lib" ; then |
Line 1886 EOF
|
Line 2001 EOF
|
fi # test "$curl" |
fi # test "$curl" |
|
|
########################################## |
########################################## |
# check framework probe |
|
|
|
if test "$check_utests" != "no" ; then |
|
cat > $TMPC << EOF |
|
#include <check.h> |
|
int main(void) { suite_create("qemu test"); return 0; } |
|
EOF |
|
check_libs=`$pkg_config --libs check 2>/dev/null` |
|
if compile_prog "" $check_libs ; then |
|
check_utests=yes |
|
libs_tools="$check_libs $libs_tools" |
|
else |
|
if test "$check_utests" = "yes" ; then |
|
feature_not_found "check" |
|
fi |
|
check_utests=no |
|
fi |
|
fi # test "$check_utests" |
|
|
|
########################################## |
|
# bluez support probe |
# bluez support probe |
if test "$bluez" != "no" ; then |
if test "$bluez" != "no" ; then |
cat > $TMPC << EOF |
cat > $TMPC << EOF |
Line 1927 fi
|
Line 2022 fi
|
|
|
########################################## |
########################################## |
# glib support probe |
# glib support probe |
if $pkg_config --modversion gthread-2.0 > /dev/null 2>&1 ; then |
|
|
if test "$mingw32" = yes; then |
|
# g_poll is required in order to integrate with the glib main loop. |
|
glib_req_ver=2.20 |
|
else |
|
glib_req_ver=2.12 |
|
fi |
|
if $pkg_config --atleast-version=$glib_req_ver gthread-2.0 > /dev/null 2>&1 |
|
then |
glib_cflags=`$pkg_config --cflags gthread-2.0 2>/dev/null` |
glib_cflags=`$pkg_config --cflags gthread-2.0 2>/dev/null` |
glib_libs=`$pkg_config --libs gthread-2.0 2>/dev/null` |
glib_libs=`$pkg_config --libs gthread-2.0 2>/dev/null` |
LIBS="$glib_libs $LIBS" |
LIBS="$glib_libs $LIBS" |
libs_qga="$glib_libs $libs_qga" |
libs_qga="$glib_libs $libs_qga" |
else |
else |
echo "glib-2.0 required to compile QEMU" |
echo "glib-$glib_req_ver required to compile QEMU" |
exit 1 |
exit 1 |
fi |
fi |
|
|
########################################## |
########################################## |
|
# libcap probe |
|
|
|
if test "$cap" != "no" ; then |
|
cat > $TMPC <<EOF |
|
#include <stdio.h> |
|
#include <sys/capability.h> |
|
int main(void) { cap_t caps; caps = cap_init(); } |
|
EOF |
|
if compile_prog "" "-lcap" ; then |
|
cap=yes |
|
else |
|
cap=no |
|
fi |
|
fi |
|
|
|
########################################## |
# pthread probe |
# pthread probe |
PTHREADLIBS_LIST="-pthread -lpthread -lpthreadGC2" |
PTHREADLIBS_LIST="-pthread -lpthread -lpthreadGC2" |
|
|
pthread=no |
pthread=no |
cat > $TMPC << EOF |
cat > $TMPC << EOF |
#include <pthread.h> |
#include <pthread.h> |
int main(void) { pthread_create(0,0,0,0); return 0; } |
static void *f(void *p) { return NULL; } |
|
int main(void) { |
|
pthread_t thread; |
|
pthread_create(&thread, 0, f, 0); |
|
return 0; |
|
} |
EOF |
EOF |
if compile_prog "" "" ; then |
if compile_prog "" "" ; then |
pthread=yes |
pthread=yes |
Line 1952 else
|
Line 2076 else
|
for pthread_lib in $PTHREADLIBS_LIST; do |
for pthread_lib in $PTHREADLIBS_LIST; do |
if compile_prog "" "$pthread_lib" ; then |
if compile_prog "" "$pthread_lib" ; then |
pthread=yes |
pthread=yes |
LIBS="$pthread_lib $LIBS" |
found=no |
|
for lib_entry in $LIBS; do |
|
if test "$lib_entry" = "$pthread_lib"; then |
|
found=yes |
|
break |
|
fi |
|
done |
|
if test "$found" = "no"; then |
|
LIBS="$pthread_lib $LIBS" |
|
fi |
break |
break |
fi |
fi |
done |
done |
Line 2048 cat > $TMPC <<EOF
|
Line 2181 cat > $TMPC <<EOF
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/uio.h> |
#include <sys/uio.h> |
#include <unistd.h> |
#include <unistd.h> |
int main(void) { struct iovec iov; return 0; } |
int main(void) { return sizeof(struct iovec); } |
EOF |
EOF |
iovec=no |
iovec=no |
if compile_prog "" "" ; then |
if compile_prog "" "" ; then |
Line 2061 cat > $TMPC <<EOF
|
Line 2194 cat > $TMPC <<EOF
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/uio.h> |
#include <sys/uio.h> |
#include <unistd.h> |
#include <unistd.h> |
int main(void) { preadv; } |
int main(void) { return preadv == preadv; } |
EOF |
EOF |
preadv=no |
preadv=no |
if compile_prog "" "" ; then |
if compile_prog "" "" ; then |
Line 2094 if test "$opengl" != "no" ; then
|
Line 2227 if test "$opengl" != "no" ; then
|
#include <X11/Xlib.h> |
#include <X11/Xlib.h> |
#include <GL/gl.h> |
#include <GL/gl.h> |
#include <GL/glx.h> |
#include <GL/glx.h> |
int main(void) { GL_VERSION; return 0; } |
int main(void) { return GL_VERSION != 0; } |
EOF |
EOF |
if compile_prog "" "-lGL" ; then |
if compile_prog "" "-lGL" ; then |
opengl=yes |
opengl=yes |
Line 2225 cat > $TMPC << EOF
|
Line 2358 cat > $TMPC << EOF
|
|
|
int main(void) |
int main(void) |
{ |
{ |
int len, fd; |
int len, fd = 0; |
len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK); |
len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK); |
splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE); |
splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE); |
return 0; |
return 0; |
Line 2239 fi
|
Line 2372 fi
|
# signalfd probe |
# signalfd probe |
signalfd="no" |
signalfd="no" |
cat > $TMPC << EOF |
cat > $TMPC << EOF |
#define _GNU_SOURCE |
|
#include <unistd.h> |
#include <unistd.h> |
#include <sys/syscall.h> |
#include <sys/syscall.h> |
#include <signal.h> |
#include <signal.h> |
Line 2257 cat > $TMPC << EOF
|
Line 2389 cat > $TMPC << EOF
|
|
|
int main(void) |
int main(void) |
{ |
{ |
int efd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); |
return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); |
return 0; |
|
} |
} |
EOF |
EOF |
if compile_prog "" "" ; then |
if compile_prog "" "" ; then |
Line 2276 int main(void)
|
Line 2407 int main(void)
|
return 0; |
return 0; |
} |
} |
EOF |
EOF |
if compile_prog "$ARCH_CFLAGS" "" ; then |
if compile_prog "" "" ; then |
fallocate=yes |
fallocate=yes |
fi |
fi |
|
|
Line 2291 int main(void)
|
Line 2422 int main(void)
|
return 0; |
return 0; |
} |
} |
EOF |
EOF |
if compile_prog "$ARCH_CFLAGS" "" ; then |
if compile_prog "" "" ; then |
sync_file_range=yes |
sync_file_range=yes |
fi |
fi |
|
|
Line 2308 int main(void)
|
Line 2439 int main(void)
|
return 0; |
return 0; |
} |
} |
EOF |
EOF |
if compile_prog "$ARCH_CFLAGS" "" ; then |
if compile_prog "" "" ; then |
fiemap=yes |
fiemap=yes |
fi |
fi |
|
|
Line 2338 int main(void)
|
Line 2469 int main(void)
|
return 0; |
return 0; |
} |
} |
EOF |
EOF |
if compile_prog "$ARCH_CFLAGS" "" ; then |
if compile_prog "" "" ; then |
epoll=yes |
epoll=yes |
fi |
fi |
|
|
Line 2358 int main(void)
|
Line 2489 int main(void)
|
* warning but not an error, and will proceed to fail the |
* warning but not an error, and will proceed to fail the |
* qemu compile where we compile with -Werror.) |
* qemu compile where we compile with -Werror.) |
*/ |
*/ |
epoll_create1; |
return epoll_create1 == epoll_create1; |
return 0; |
|
} |
} |
EOF |
EOF |
if compile_prog "$ARCH_CFLAGS" "" ; then |
if compile_prog "" "" ; then |
epoll_create1=yes |
epoll_create1=yes |
fi |
fi |
|
|
Line 2376 int main(void)
|
Line 2506 int main(void)
|
return 0; |
return 0; |
} |
} |
EOF |
EOF |
if compile_prog "$ARCH_CFLAGS" "" ; then |
if compile_prog "" "" ; then |
epoll_pwait=yes |
epoll_pwait=yes |
fi |
fi |
|
|
Line 2416 fi
|
Line 2546 fi
|
|
|
########################################## |
########################################## |
# Do we have libiscsi |
# Do we have libiscsi |
|
# We check for iscsi_unmap_sync() to make sure we have a |
|
# recent enough version of libiscsi. |
if test "$libiscsi" != "no" ; then |
if test "$libiscsi" != "no" ; then |
cat > $TMPC << EOF |
cat > $TMPC << EOF |
|
#include <stdio.h> |
#include <iscsi/iscsi.h> |
#include <iscsi/iscsi.h> |
int main(void) { iscsi_create_context(""); return 0; } |
int main(void) { iscsi_unmap_sync(NULL,0,0,0,NULL,0); return 0; } |
EOF |
EOF |
if compile_prog "-Werror" "-liscsi" ; then |
if compile_prog "-Werror" "-liscsi" ; then |
libiscsi="yes" |
libiscsi="yes" |
Line 2438 fi
|
Line 2571 fi
|
cat > $TMPC <<EOF |
cat > $TMPC <<EOF |
#include <signal.h> |
#include <signal.h> |
#include <time.h> |
#include <time.h> |
int main(void) { clockid_t id; return clock_gettime(id, NULL); } |
int main(void) { return clock_gettime(CLOCK_REALTIME, NULL); } |
EOF |
EOF |
|
|
if compile_prog "" "" ; then |
if compile_prog "" "" ; then |
Line 2453 if test "$darwin" != "yes" -a "$mingw32"
|
Line 2586 if test "$darwin" != "yes" -a "$mingw32"
|
fi |
fi |
|
|
########################################## |
########################################## |
# check if the compiler defines offsetof |
|
|
|
need_offsetof=yes |
|
cat > $TMPC << EOF |
|
#include <stddef.h> |
|
int main(void) { struct s { int f; }; return offsetof(struct s, f); } |
|
EOF |
|
if compile_prog "" "" ; then |
|
need_offsetof=no |
|
fi |
|
|
|
# spice probe |
# spice probe |
if test "$spice" != "no" ; then |
if test "$spice" != "no" ; then |
cat > $TMPC << EOF |
cat > $TMPC << EOF |
Line 2472 int main(void) { spice_server_new(); ret
|
Line 2594 int main(void) { spice_server_new(); ret
|
EOF |
EOF |
spice_cflags=$($pkg_config --cflags spice-protocol spice-server 2>/dev/null) |
spice_cflags=$($pkg_config --cflags spice-protocol spice-server 2>/dev/null) |
spice_libs=$($pkg_config --libs spice-protocol spice-server 2>/dev/null) |
spice_libs=$($pkg_config --libs spice-protocol spice-server 2>/dev/null) |
if $pkg_config --atleast-version=0.6.0 spice-server >/dev/null 2>&1 && \ |
if $pkg_config --atleast-version=0.8.2 spice-server >/dev/null 2>&1 && \ |
|
$pkg_config --atleast-version=0.8.1 spice-protocol > /dev/null 2>&1 && \ |
compile_prog "$spice_cflags" "$spice_libs" ; then |
compile_prog "$spice_cflags" "$spice_libs" ; then |
spice="yes" |
spice="yes" |
libs_softmmu="$libs_softmmu $spice_libs" |
libs_softmmu="$libs_softmmu $spice_libs" |
Line 2491 if test "$smartcard" != "no" ; then
|
Line 2614 if test "$smartcard" != "no" ; then
|
smartcard_cflags="" |
smartcard_cflags="" |
# TODO - what's the minimal nss version we support? |
# TODO - what's the minimal nss version we support? |
if test "$smartcard_nss" != "no"; then |
if test "$smartcard_nss" != "no"; then |
if $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 ; then |
cat > $TMPC << EOF |
|
#include <pk11pub.h> |
|
int main(void) { PK11_FreeSlot(0); return 0; } |
|
EOF |
|
smartcard_cflags="-I\$(SRC_PATH)/libcacard" |
|
libcacard_libs="$($pkg_config --libs nss 2>/dev/null) $glib_libs" |
|
libcacard_cflags="$($pkg_config --cflags nss 2>/dev/null) $glib_cflags" |
|
if $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 && \ |
|
compile_prog "$smartcard_cflags $libcacard_cflags" "$libcacard_libs"; then |
smartcard_nss="yes" |
smartcard_nss="yes" |
smartcard_cflags="-I\$(SRC_PATH)/libcacard" |
|
libcacard_libs=$($pkg_config --libs nss 2>/dev/null) |
|
libcacard_cflags=$($pkg_config --cflags nss 2>/dev/null) |
|
QEMU_CFLAGS="$QEMU_CFLAGS $smartcard_cflags $libcacard_cflags" |
QEMU_CFLAGS="$QEMU_CFLAGS $smartcard_cflags $libcacard_cflags" |
LIBS="$libcacard_libs $LIBS" |
libs_softmmu="$libcacard_libs $libs_softmmu" |
else |
else |
if test "$smartcard_nss" = "yes"; then |
if test "$smartcard_nss" = "yes"; then |
feature_not_found "nss" |
feature_not_found "nss" |
Line 2512 fi
|
Line 2640 fi
|
|
|
# check for usbredirparser for usb network redirection support |
# check for usbredirparser for usb network redirection support |
if test "$usb_redir" != "no" ; then |
if test "$usb_redir" != "no" ; then |
if $pkg_config libusbredirparser >/dev/null 2>&1 ; then |
if $pkg_config --atleast-version=0.3.4 libusbredirparser >/dev/null 2>&1 ; then |
usb_redir="yes" |
usb_redir="yes" |
usb_redir_cflags=$($pkg_config --cflags libusbredirparser 2>/dev/null) |
usb_redir_cflags=$($pkg_config --cflags libusbredirparser 2>/dev/null) |
usb_redir_libs=$($pkg_config --libs libusbredirparser 2>/dev/null) |
usb_redir_libs=$($pkg_config --libs libusbredirparser 2>/dev/null) |
Line 2538 int main(void) {
|
Line 2666 int main(void) {
|
#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 |
#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 |
return fdatasync(0); |
return fdatasync(0); |
#else |
#else |
#abort Not supported |
#error Not supported |
#endif |
#endif |
} |
} |
EOF |
EOF |
Line 2576 fi
|
Line 2704 fi
|
########################################## |
########################################## |
# check if trace backend exists |
# check if trace backend exists |
|
|
sh "$source_path/scripts/tracetool" "--$trace_backend" --check-backend > /dev/null 2> /dev/null |
$python "$source_path/scripts/tracetool.py" "--backend=$trace_backend" --check-backend > /dev/null 2> /dev/null |
if test "$?" -ne 0 ; then |
if test "$?" -ne 0 ; then |
echo |
echo |
echo "Error: invalid trace backend" |
echo "Error: invalid trace backend" |
Line 2594 if test "$trace_backend" = "ust"; then
|
Line 2722 if test "$trace_backend" = "ust"; then
|
int main(void) { return 0; } |
int main(void) { return 0; } |
EOF |
EOF |
if compile_prog "" "" ; then |
if compile_prog "" "" ; then |
LIBS="-lust $LIBS" |
LIBS="-lust -lurcu-bp $LIBS" |
|
libs_qga="-lust -lurcu-bp $libs_qga" |
else |
else |
echo |
echo |
echo "Error: Trace backend 'ust' missing libust header files" |
echo "Error: Trace backend 'ust' missing libust header files" |
Line 2642 EOF
|
Line 2771 EOF
|
fi |
fi |
|
|
########################################## |
########################################## |
# check if we have makecontext |
# check and set a backend for coroutine |
|
|
ucontext_coroutine=no |
# default is ucontext, but always fallback to gthread |
if test "$darwin" != "yes"; then |
# windows autodetected by make |
cat > $TMPC << EOF |
if test "$coroutine" = "" -o "$coroutine" = "ucontext"; then |
|
if test "$darwin" != "yes"; then |
|
cat > $TMPC << EOF |
#include <ucontext.h> |
#include <ucontext.h> |
int main(void) { makecontext(0, 0, 0); } |
#ifdef __stub_makecontext |
|
#error Ignoring glibc stub makecontext which will always fail |
|
#endif |
|
int main(void) { makecontext(0, 0, 0); return 0; } |
EOF |
EOF |
if compile_prog "" "" ; then |
if compile_prog "" "" ; then |
ucontext_coroutine=yes |
coroutine_backend=ucontext |
|
else |
|
coroutine_backend=gthread |
|
fi |
|
else |
|
echo "Silently falling back into gthread backend under darwin" |
fi |
fi |
|
elif test "$coroutine" = "gthread" ; then |
|
coroutine_backend=gthread |
|
elif test "$coroutine" = "windows" ; then |
|
coroutine_backend=windows |
|
elif test "$coroutine" = "sigaltstack" ; then |
|
coroutine_backend=sigaltstack |
|
else |
|
echo |
|
echo "Error: unknown coroutine backend $coroutine" |
|
echo |
|
exit 1 |
fi |
fi |
|
|
########################################## |
########################################## |
Line 2661 fi
|
Line 2811 fi
|
open_by_hande_at=no |
open_by_hande_at=no |
cat > $TMPC << EOF |
cat > $TMPC << EOF |
#include <fcntl.h> |
#include <fcntl.h> |
int main(void) { struct file_handle fh; open_by_handle_at(0, &fh, 0); } |
#if !defined(AT_EMPTY_PATH) |
|
# error missing definition |
|
#else |
|
int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); } |
|
#endif |
EOF |
EOF |
if compile_prog "" "" ; then |
if compile_prog "" "" ; then |
open_by_handle_at=yes |
open_by_handle_at=yes |
Line 2674 linux_magic_h=no
|
Line 2828 linux_magic_h=no
|
cat > $TMPC << EOF |
cat > $TMPC << EOF |
#include <linux/magic.h> |
#include <linux/magic.h> |
int main(void) { |
int main(void) { |
|
return 0; |
} |
} |
EOF |
EOF |
if compile_prog "" "" ; then |
if compile_prog "" "" ; then |
linux_magic_h=yes |
linux_magic_h=yes |
fi |
fi |
|
|
|
######################################## |
|
# check if environ is declared |
|
|
|
has_environ=no |
|
cat > $TMPC << EOF |
|
#include <unistd.h> |
|
int main(void) { |
|
environ = environ; |
|
return 0; |
|
} |
|
EOF |
|
if compile_prog "" "" ; then |
|
has_environ=yes |
|
fi |
|
|
########################################## |
########################################## |
# End of CC checks |
# End of CC checks |
# After here, no more $cc or $ld runs |
# After here, no more $cc or $ld runs |
Line 2721 if test "$solaris" = "no" ; then
|
Line 2891 if test "$solaris" = "no" ; then
|
fi |
fi |
fi |
fi |
|
|
|
# test if pod2man has --utf8 option |
|
if pod2man --help | grep -q utf8; then |
|
POD2MAN="pod2man --utf8" |
|
else |
|
POD2MAN="pod2man" |
|
fi |
|
|
# Use ASLR, no-SEH and DEP if available |
# Use ASLR, no-SEH and DEP if available |
if test "$mingw32" = "yes" ; then |
if test "$mingw32" = "yes" ; then |
for flag in --dynamicbase --no-seh --nxcompat; do |
for flag in --dynamicbase --no-seh --nxcompat; do |
Line 2730 if test "$mingw32" = "yes" ; then
|
Line 2907 if test "$mingw32" = "yes" ; then
|
done |
done |
fi |
fi |
|
|
confdir=$sysconfdir$confsuffix |
qemu_confdir=$sysconfdir$confsuffix |
|
qemu_datadir=$datadir$confsuffix |
|
|
tools= |
tools= |
if test "$softmmu" = yes ; then |
if test "$softmmu" = yes ; then |
tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools" |
tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools" |
|
if test "$virtfs" != no ; then |
|
if test "$cap" = yes && test "$linux" = yes && test "$attr" = yes ; then |
|
virtfs=yes |
|
tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)" |
|
else |
|
if test "$virtfs" = yes; then |
|
echo "VirtFS is supported only on Linux and requires libcap-devel and libattr-devel" |
|
exit 1 |
|
fi |
|
virtfs=no |
|
fi |
|
fi |
if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then |
if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then |
tools="qemu-nbd\$(EXESUF) $tools" |
tools="qemu-nbd\$(EXESUF) $tools" |
if [ "$guest_agent" = "yes" ]; then |
if [ "$guest_agent" = "yes" ]; then |
tools="qemu-ga\$(EXESUF) $tools" |
tools="qemu-ga\$(EXESUF) $tools" |
fi |
fi |
if [ "$check_utests" = "yes" ]; then |
|
checks="check-qint check-qstring check-qdict check-qlist" |
|
checks="check-qfloat check-qjson test-coroutine $checks" |
|
fi |
|
fi |
fi |
fi |
fi |
|
|
Line 2759 if test "$cpu" = "ppc64" -a "$targetos"
|
Line 2945 if test "$cpu" = "ppc64" -a "$targetos"
|
fi |
fi |
|
|
echo "Install prefix $prefix" |
echo "Install prefix $prefix" |
echo "BIOS directory `eval echo $datadir`" |
echo "BIOS directory `eval echo $qemu_datadir`" |
echo "binary directory `eval echo $bindir`" |
echo "binary directory `eval echo $bindir`" |
echo "library directory `eval echo $libdir`" |
echo "library directory `eval echo $libdir`" |
echo "include directory `eval echo $includedir`" |
echo "include directory `eval echo $includedir`" |
Line 2797 fi
|
Line 2983 fi
|
echo "SDL support $sdl" |
echo "SDL support $sdl" |
echo "curses support $curses" |
echo "curses support $curses" |
echo "curl support $curl" |
echo "curl support $curl" |
echo "check support $check_utests" |
|
echo "mingw32 support $mingw32" |
echo "mingw32 support $mingw32" |
echo "Audio drivers $audio_drv_list" |
echo "Audio drivers $audio_drv_list" |
echo "Extra audio cards $audio_card_list" |
echo "Extra audio cards $audio_card_list" |
echo "Block whitelist $block_drv_whitelist" |
echo "Block whitelist $block_drv_whitelist" |
echo "Mixer emulation $mixemu" |
echo "Mixer emulation $mixemu" |
|
echo "VirtFS support $virtfs" |
echo "VNC support $vnc" |
echo "VNC support $vnc" |
if test "$vnc" = "yes" ; then |
if test "$vnc" = "yes" ; then |
echo "VNC TLS support $vnc_tls" |
echo "VNC TLS support $vnc_tls" |
Line 2835 echo "fdatasync $fdatasync"
|
Line 3021 echo "fdatasync $fdatasync"
|
echo "madvise $madvise" |
echo "madvise $madvise" |
echo "posix_madvise $posix_madvise" |
echo "posix_madvise $posix_madvise" |
echo "uuid support $uuid" |
echo "uuid support $uuid" |
|
echo "libcap-ng support $cap_ng" |
echo "vhost-net support $vhost_net" |
echo "vhost-net support $vhost_net" |
echo "Trace backend $trace_backend" |
echo "Trace backend $trace_backend" |
echo "Trace output file $trace_file-<pid>" |
echo "Trace output file $trace_file-<pid>" |
Line 2846 echo "usb net redir $usb_redir"
|
Line 3033 echo "usb net redir $usb_redir"
|
echo "OpenGL support $opengl" |
echo "OpenGL support $opengl" |
echo "libiscsi support $libiscsi" |
echo "libiscsi support $libiscsi" |
echo "build guest agent $guest_agent" |
echo "build guest agent $guest_agent" |
|
echo "coroutine backend $coroutine_backend" |
|
|
if test "$sdl_too_old" = "yes"; then |
if test "$sdl_too_old" = "yes"; then |
echo "-> Your SDL version is too old - please upgrade to have SDL support" |
echo "-> Your SDL version is too old - please upgrade to have SDL support" |
Line 2865 echo "bindir=$bindir" >> $config_host_ma
|
Line 3053 echo "bindir=$bindir" >> $config_host_ma
|
echo "libdir=$libdir" >> $config_host_mak |
echo "libdir=$libdir" >> $config_host_mak |
echo "includedir=$includedir" >> $config_host_mak |
echo "includedir=$includedir" >> $config_host_mak |
echo "mandir=$mandir" >> $config_host_mak |
echo "mandir=$mandir" >> $config_host_mak |
echo "datadir=$datadir" >> $config_host_mak |
|
echo "sysconfdir=$sysconfdir" >> $config_host_mak |
echo "sysconfdir=$sysconfdir" >> $config_host_mak |
echo "docdir=$docdir" >> $config_host_mak |
echo "qemu_confdir=$qemu_confdir" >> $config_host_mak |
echo "confdir=$confdir" >> $config_host_mak |
echo "qemu_datadir=$qemu_datadir" >> $config_host_mak |
|
echo "qemu_docdir=$qemu_docdir" >> $config_host_mak |
|
echo "libexecdir=\${prefix}/libexec" >> $config_host_mak |
|
echo "CONFIG_QEMU_HELPERDIR=\"$prefix/libexec\"" >> $config_host_mak |
|
|
case "$cpu" in |
|
i386|x86_64|alpha|cris|hppa|ia64|lm32|m68k|microblaze|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64|unicore32) |
|
ARCH=$cpu |
|
;; |
|
armv4b|armv4l) |
|
ARCH=arm |
|
;; |
|
*) |
|
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 |
echo "ARCH=$ARCH" >> $config_host_mak |
if test "$debug_tcg" = "yes" ; then |
if test "$debug_tcg" = "yes" ; then |
echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak |
echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak |
Line 2903 fi
|
Line 3076 fi
|
if test "$bigendian" = "yes" ; then |
if test "$bigendian" = "yes" ; then |
echo "HOST_WORDS_BIGENDIAN=y" >> $config_host_mak |
echo "HOST_WORDS_BIGENDIAN=y" >> $config_host_mak |
fi |
fi |
echo "HOST_LONG_BITS=$hostlongbits" >> $config_host_mak |
|
if test "$mingw32" = "yes" ; then |
if test "$mingw32" = "yes" ; then |
echo "CONFIG_WIN32=y" >> $config_host_mak |
echo "CONFIG_WIN32=y" >> $config_host_mak |
rc_version=`cat $source_path/VERSION` |
rc_version=`cat $source_path/VERSION` |
Line 2955 fi
|
Line 3127 fi
|
if test "$vde" = "yes" ; then |
if test "$vde" = "yes" ; then |
echo "CONFIG_VDE=y" >> $config_host_mak |
echo "CONFIG_VDE=y" >> $config_host_mak |
fi |
fi |
|
if test "$cap_ng" = "yes" ; then |
|
echo "CONFIG_LIBCAP=y" >> $config_host_mak |
|
fi |
for card in $audio_card_list; do |
for card in $audio_card_list; do |
def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'` |
def=CONFIG_`echo $card | LC_ALL=C tr '[a-z]' '[A-Z]'` |
echo "$def=y" >> $config_host_mak |
echo "$def=y" >> $config_host_mak |
done |
done |
echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak |
echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak |
for drv in $audio_drv_list; do |
for drv in $audio_drv_list; do |
def=CONFIG_`echo $drv | tr '[:lower:]' '[:upper:]'` |
def=CONFIG_`echo $drv | LC_ALL=C tr '[a-z]' '[A-Z]'` |
echo "$def=y" >> $config_host_mak |
echo "$def=y" >> $config_host_mak |
if test "$drv" = "fmod"; then |
if test "$drv" = "fmod"; then |
echo "FMOD_CFLAGS=-I$fmod_inc" >> $config_host_mak |
echo "FMOD_CFLAGS=-I$fmod_inc" >> $config_host_mak |
Line 3102 fi
|
Line 3277 fi
|
if test "$libattr" = "yes" ; then |
if test "$libattr" = "yes" ; then |
echo "CONFIG_LIBATTR=y" >> $config_host_mak |
echo "CONFIG_LIBATTR=y" >> $config_host_mak |
fi |
fi |
if test "$linux" = "yes" ; then |
if test "$virtfs" = "yes" ; then |
if test "$attr" = "yes" ; then |
echo "CONFIG_VIRTFS=y" >> $config_host_mak |
echo "CONFIG_VIRTFS=y" >> $config_host_mak |
|
fi |
|
fi |
fi |
if test "$blobs" = "yes" ; then |
if test "$blobs" = "yes" ; then |
echo "INSTALL_BLOBS=yes" >> $config_host_mak |
echo "INSTALL_BLOBS=yes" >> $config_host_mak |
Line 3125 fi
|
Line 3298 fi
|
if test "$tcg_interpreter" = "yes" ; then |
if test "$tcg_interpreter" = "yes" ; then |
echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak |
echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak |
fi |
fi |
if test "$need_offsetof" = "yes" ; then |
|
echo "CONFIG_NEED_OFFSETOF=y" >> $config_host_mak |
|
fi |
|
if test "$fdatasync" = "yes" ; then |
if test "$fdatasync" = "yes" ; then |
echo "CONFIG_FDATASYNC=y" >> $config_host_mak |
echo "CONFIG_FDATASYNC=y" >> $config_host_mak |
fi |
fi |
Line 3148 fi
|
Line 3318 fi
|
|
|
if test "$smartcard_nss" = "yes" ; then |
if test "$smartcard_nss" = "yes" ; then |
echo "CONFIG_SMARTCARD_NSS=y" >> $config_host_mak |
echo "CONFIG_SMARTCARD_NSS=y" >> $config_host_mak |
|
echo "libcacard_libs=$libcacard_libs" >> $config_host_mak |
|
echo "libcacard_cflags=$libcacard_cflags" >> $config_host_mak |
fi |
fi |
|
|
if test "$usb_redir" = "yes" ; then |
if test "$usb_redir" = "yes" ; then |
Line 3176 if test "$rbd" = "yes" ; then
|
Line 3348 if test "$rbd" = "yes" ; then
|
echo "CONFIG_RBD=y" >> $config_host_mak |
echo "CONFIG_RBD=y" >> $config_host_mak |
fi |
fi |
|
|
if test "$ucontext_coroutine" = "yes" ; then |
if test "$coroutine_backend" = "ucontext" ; then |
echo "CONFIG_UCONTEXT_COROUTINE=y" >> $config_host_mak |
echo "CONFIG_UCONTEXT_COROUTINE=y" >> $config_host_mak |
|
elif test "$coroutine_backend" = "sigaltstack" ; then |
|
echo "CONFIG_SIGALTSTACK_COROUTINE=y" >> $config_host_mak |
fi |
fi |
|
|
if test "$open_by_handle_at" = "yes" ; then |
if test "$open_by_handle_at" = "yes" ; then |
Line 3188 if test "$linux_magic_h" = "yes" ; then
|
Line 3362 if test "$linux_magic_h" = "yes" ; then
|
echo "CONFIG_LINUX_MAGIC_H=y" >> $config_host_mak |
echo "CONFIG_LINUX_MAGIC_H=y" >> $config_host_mak |
fi |
fi |
|
|
|
if test "$has_environ" = "yes" ; then |
|
echo "CONFIG_HAS_ENVIRON=y" >> $config_host_mak |
|
fi |
|
|
# USB host support |
# USB host support |
case "$usb" in |
case "$usb" in |
linux) |
linux) |
Line 3232 if test "$trace_default" = "yes"; then
|
Line 3410 if test "$trace_default" = "yes"; then
|
fi |
fi |
|
|
echo "TOOLS=$tools" >> $config_host_mak |
echo "TOOLS=$tools" >> $config_host_mak |
echo "CHECKS=$checks" >> $config_host_mak |
|
echo "ROMS=$roms" >> $config_host_mak |
echo "ROMS=$roms" >> $config_host_mak |
echo "MAKE=$make" >> $config_host_mak |
echo "MAKE=$make" >> $config_host_mak |
echo "INSTALL=$install" >> $config_host_mak |
echo "INSTALL=$install" >> $config_host_mak |
Line 3264 echo "LIBS+=$LIBS" >> $config_host_mak
|
Line 3441 echo "LIBS+=$LIBS" >> $config_host_mak
|
echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak |
echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak |
echo "EXESUF=$EXESUF" >> $config_host_mak |
echo "EXESUF=$EXESUF" >> $config_host_mak |
echo "LIBS_QGA+=$libs_qga" >> $config_host_mak |
echo "LIBS_QGA+=$libs_qga" >> $config_host_mak |
|
echo "POD2MAN=$POD2MAN" >> $config_host_mak |
|
|
# generate list of library paths for linker script |
# generate list of library paths for linker script |
|
|
Line 3279 fi
|
Line 3457 fi
|
|
|
for d in libdis libdis-user; do |
for d in libdis libdis-user; do |
mkdir -p $d |
mkdir -p $d |
symlink $source_path/Makefile.dis $d/Makefile |
symlink "$source_path/Makefile.dis" "$d/Makefile" |
echo > $d/config.mak |
echo > $d/config.mak |
done |
done |
|
|
|
# use included Linux headers |
|
if test "$linux" = "yes" ; then |
|
mkdir -p linux-headers |
|
case "$cpu" in |
|
i386|x86_64) |
|
symlink "$source_path/linux-headers/asm-x86" linux-headers/asm |
|
;; |
|
ppcemb|ppc|ppc64) |
|
symlink "$source_path/linux-headers/asm-powerpc" linux-headers/asm |
|
;; |
|
s390x) |
|
symlink "$source_path/linux-headers/asm-s390" linux-headers/asm |
|
;; |
|
esac |
|
fi |
|
|
for target in $target_list; do |
for target in $target_list; do |
target_dir="$target" |
target_dir="$target" |
config_target_mak=$target_dir/config-target.mak |
config_target_mak=$target_dir/config-target.mak |
Line 3297 esac
|
Line 3491 esac
|
target_softmmu="no" |
target_softmmu="no" |
target_user_only="no" |
target_user_only="no" |
target_linux_user="no" |
target_linux_user="no" |
target_darwin_user="no" |
|
target_bsd_user="no" |
target_bsd_user="no" |
case "$target" in |
case "$target" in |
${target_arch2}-softmmu) |
${target_arch2}-softmmu) |
Line 3311 case "$target" in
|
Line 3504 case "$target" in
|
target_user_only="yes" |
target_user_only="yes" |
target_linux_user="yes" |
target_linux_user="yes" |
;; |
;; |
${target_arch2}-darwin-user) |
|
if test "$darwin" != "yes" ; then |
|
echo "ERROR: Target '$target' is only available on a Darwin host" |
|
exit 1 |
|
fi |
|
target_user_only="yes" |
|
target_darwin_user="yes" |
|
;; |
|
${target_arch2}-bsd-user) |
${target_arch2}-bsd-user) |
if test "$bsd" != "yes" ; then |
if test "$bsd" != "yes" ; then |
echo "ERROR: Target '$target' is only available on a BSD host" |
echo "ERROR: Target '$target' is only available on a BSD host" |
Line 3337 mkdir -p $target_dir
|
Line 3522 mkdir -p $target_dir
|
mkdir -p $target_dir/fpu |
mkdir -p $target_dir/fpu |
mkdir -p $target_dir/tcg |
mkdir -p $target_dir/tcg |
mkdir -p $target_dir/ide |
mkdir -p $target_dir/ide |
|
mkdir -p $target_dir/usb |
mkdir -p $target_dir/9pfs |
mkdir -p $target_dir/9pfs |
|
mkdir -p $target_dir/kvm |
if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" -o "$target" = "arm-bsd-user" -o "$target" = "armeb-bsd-user" ; then |
if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" -o "$target" = "arm-bsd-user" -o "$target" = "armeb-bsd-user" ; then |
mkdir -p $target_dir/nwfpe |
mkdir -p $target_dir/nwfpe |
fi |
fi |
symlink $source_path/Makefile.target $target_dir/Makefile |
symlink "$source_path/Makefile.target" "$target_dir/Makefile" |
|
|
|
|
echo "# Automatically generated by configure - do not modify" > $config_target_mak |
echo "# Automatically generated by configure - do not modify" > $config_target_mak |
Line 3349 echo "# Automatically generated by confi
|
Line 3536 echo "# Automatically generated by confi
|
bflt="no" |
bflt="no" |
target_nptl="no" |
target_nptl="no" |
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"` |
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"` |
echo "CONFIG_QEMU_INTERP_PREFIX=\"$interp_prefix1\"" >> $config_target_mak |
|
gdb_xml_files="" |
gdb_xml_files="" |
target_short_alignment=2 |
target_short_alignment=2 |
target_int_alignment=4 |
target_int_alignment=4 |
Line 3382 case "$target_arch2" in
|
Line 3568 case "$target_arch2" in
|
gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" |
gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" |
target_phys_bits=32 |
target_phys_bits=32 |
target_llong_alignment=4 |
target_llong_alignment=4 |
|
target_libs_softmmu="$fdt_libs" |
;; |
;; |
cris) |
cris) |
target_nptl="yes" |
target_nptl="yes" |
Line 3494 case "$target_arch2" in
|
Line 3681 case "$target_arch2" in
|
exit 1 |
exit 1 |
;; |
;; |
esac |
esac |
|
|
|
case "$target_arch2" in |
|
alpha | sparc*) |
|
echo "CONFIG_TCG_PASS_AREG0=y" >> $config_target_mak |
|
;; |
|
esac |
|
|
echo "TARGET_SHORT_ALIGNMENT=$target_short_alignment" >> $config_target_mak |
echo "TARGET_SHORT_ALIGNMENT=$target_short_alignment" >> $config_target_mak |
echo "TARGET_INT_ALIGNMENT=$target_int_alignment" >> $config_target_mak |
echo "TARGET_INT_ALIGNMENT=$target_int_alignment" >> $config_target_mak |
echo "TARGET_LONG_ALIGNMENT=$target_long_alignment" >> $config_target_mak |
echo "TARGET_LONG_ALIGNMENT=$target_long_alignment" >> $config_target_mak |
echo "TARGET_LLONG_ALIGNMENT=$target_llong_alignment" >> $config_target_mak |
echo "TARGET_LLONG_ALIGNMENT=$target_llong_alignment" >> $config_target_mak |
echo "TARGET_ARCH=$TARGET_ARCH" >> $config_target_mak |
echo "TARGET_ARCH=$TARGET_ARCH" >> $config_target_mak |
target_arch_name="`echo $TARGET_ARCH | tr '[:lower:]' '[:upper:]'`" |
target_arch_name="`echo $TARGET_ARCH | LC_ALL=C tr '[a-z]' '[A-Z]'`" |
echo "TARGET_$target_arch_name=y" >> $config_target_mak |
echo "TARGET_$target_arch_name=y" >> $config_target_mak |
echo "TARGET_ARCH2=$target_arch2" >> $config_target_mak |
echo "TARGET_ARCH2=$target_arch2" >> $config_target_mak |
# TARGET_BASE_ARCH needs to be defined after TARGET_ARCH |
# TARGET_BASE_ARCH needs to be defined after TARGET_ARCH |
Line 3552 if test "$target_softmmu" = "yes" ; then
|
Line 3746 if test "$target_softmmu" = "yes" ; then
|
echo "LIBS+=$libs_softmmu $target_libs_softmmu" >> $config_target_mak |
echo "LIBS+=$libs_softmmu $target_libs_softmmu" >> $config_target_mak |
echo "HWDIR=../libhw$target_phys_bits" >> $config_target_mak |
echo "HWDIR=../libhw$target_phys_bits" >> $config_target_mak |
echo "subdir-$target: subdir-libhw$target_phys_bits" >> $config_host_mak |
echo "subdir-$target: subdir-libhw$target_phys_bits" >> $config_host_mak |
|
if test "$smartcard_nss" = "yes" ; then |
|
echo "subdir-$target: subdir-libcacard" >> $config_host_mak |
|
fi |
fi |
fi |
if test "$target_user_only" = "yes" ; then |
if test "$target_user_only" = "yes" ; then |
echo "CONFIG_USER_ONLY=y" >> $config_target_mak |
echo "CONFIG_USER_ONLY=y" >> $config_target_mak |
|
echo "CONFIG_QEMU_INTERP_PREFIX=\"$interp_prefix1\"" >> $config_target_mak |
fi |
fi |
if test "$target_linux_user" = "yes" ; then |
if test "$target_linux_user" = "yes" ; then |
echo "CONFIG_LINUX_USER=y" >> $config_target_mak |
echo "CONFIG_LINUX_USER=y" >> $config_target_mak |
fi |
fi |
if test "$target_darwin_user" = "yes" ; then |
|
echo "CONFIG_DARWIN_USER=y" >> $config_target_mak |
|
fi |
|
if test "$smartcard_nss" = "yes" ; then |
|
echo "subdir-$target: subdir-libcacard" >> $config_host_mak |
|
echo "libcacard_libs=$libcacard_libs" >> $config_host_mak |
|
echo "libcacard_cflags=$libcacard_cflags" >> $config_host_mak |
|
fi |
|
list="" |
list="" |
if test ! -z "$gdb_xml_files" ; then |
if test ! -z "$gdb_xml_files" ; then |
for x in $gdb_xml_files; do |
for x in $gdb_xml_files; do |
Line 3608 else
|
Line 3798 else
|
fi |
fi |
includes="-I\$(SRC_PATH)/tcg $includes" |
includes="-I\$(SRC_PATH)/tcg $includes" |
|
|
|
if test "$linux" = "yes" ; then |
|
includes="-I\$(SRC_PATH)/linux-headers $includes" |
|
fi |
|
|
if test "$target_user_only" = "yes" ; then |
if test "$target_user_only" = "yes" ; then |
libdis_config_mak=libdis-user/config.mak |
libdis_config_mak=libdis-user/config.mak |
else |
else |
Line 3640 for i in $ARCH $TARGET_BASE_ARCH ; do
|
Line 3834 for i in $ARCH $TARGET_BASE_ARCH ; do
|
echo "CONFIG_IA64_DIS=y" >> $config_target_mak |
echo "CONFIG_IA64_DIS=y" >> $config_target_mak |
echo "CONFIG_IA64_DIS=y" >> $libdis_config_mak |
echo "CONFIG_IA64_DIS=y" >> $libdis_config_mak |
;; |
;; |
|
lm32) |
|
echo "CONFIG_LM32_DIS=y" >> $config_target_mak |
|
echo "CONFIG_LM32_DIS=y" >> $libdis_config_mak |
|
;; |
m68k) |
m68k) |
echo "CONFIG_M68K_DIS=y" >> $config_target_mak |
echo "CONFIG_M68K_DIS=y" >> $config_target_mak |
echo "CONFIG_M68K_DIS=y" >> $libdis_config_mak |
echo "CONFIG_M68K_DIS=y" >> $libdis_config_mak |
Line 3739 if test "$target_linux_user" = "yes" -o
|
Line 3937 if test "$target_linux_user" = "yes" -o
|
esac |
esac |
fi |
fi |
|
|
# use included Linux headers |
|
if test "$linux" = "yes" ; then |
|
includes="-I\$(SRC_PATH)/linux-headers $includes" |
|
mkdir -p linux-headers |
|
case "$cpu" in |
|
i386|x86_64) |
|
symlink $source_path/linux-headers/asm-x86 linux-headers/asm |
|
;; |
|
ppcemb|ppc|ppc64) |
|
symlink $source_path/linux-headers/asm-powerpc linux-headers/asm |
|
;; |
|
s390x) |
|
symlink $source_path/linux-headers/asm-s390 linux-headers/asm |
|
;; |
|
esac |
|
fi |
|
|
|
echo "LDFLAGS+=$ldflags" >> $config_target_mak |
echo "LDFLAGS+=$ldflags" >> $config_target_mak |
echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak |
echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak |
echo "QEMU_INCLUDES+=$includes" >> $config_target_mak |
echo "QEMU_INCLUDES+=$includes" >> $config_target_mak |
Line 3763 echo "QEMU_INCLUDES+=$includes" >> $conf
|
Line 3944 echo "QEMU_INCLUDES+=$includes" >> $conf
|
done # for target in $targets |
done # for target in $targets |
|
|
# build tree in object directory in case the source is not in the current directory |
# build tree in object directory in case the source is not in the current directory |
DIRS="tests tests/cris slirp audio block net pc-bios/optionrom" |
DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32" |
|
DIRS="$DIRS slirp audio block net pc-bios/optionrom" |
DIRS="$DIRS pc-bios/spapr-rtas" |
DIRS="$DIRS pc-bios/spapr-rtas" |
DIRS="$DIRS roms/seabios roms/vgabios" |
DIRS="$DIRS roms/seabios roms/vgabios" |
DIRS="$DIRS fsdev ui" |
DIRS="$DIRS fsdev ui usb" |
DIRS="$DIRS qapi qapi-generated" |
DIRS="$DIRS qapi qapi-generated" |
DIRS="$DIRS qga trace" |
DIRS="$DIRS qga trace qom" |
FILES="Makefile tests/Makefile qdict-test-data.txt" |
FILES="Makefile tests/tcg/Makefile qdict-test-data.txt" |
FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit" |
FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit" |
|
FILES="$FILES tests/tcg/lm32/Makefile" |
FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps" |
FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps" |
FILES="$FILES pc-bios/spapr-rtas/Makefile" |
FILES="$FILES pc-bios/spapr-rtas/Makefile" |
FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile" |
FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile" |
Line 3785 do
|
Line 3968 do
|
done |
done |
mkdir -p $DIRS |
mkdir -p $DIRS |
for f in $FILES ; do |
for f in $FILES ; do |
if [ -e "$source_path/$f" ] && ! [ -e "$f" ]; then |
if [ -e "$source_path/$f" ] && [ "$source_path" != `pwd` ]; then |
symlink "$source_path/$f" "$f" |
symlink "$source_path/$f" "$f" |
fi |
fi |
done |
done |
Line 3807 for hwlib in 32 64; do
|
Line 3990 for hwlib in 32 64; do
|
d=libhw$hwlib |
d=libhw$hwlib |
mkdir -p $d |
mkdir -p $d |
mkdir -p $d/ide |
mkdir -p $d/ide |
symlink $source_path/Makefile.hw $d/Makefile |
mkdir -p $d/usb |
|
symlink "$source_path/Makefile.hw" "$d/Makefile" |
mkdir -p $d/9pfs |
mkdir -p $d/9pfs |
echo "QEMU_CFLAGS+=-DTARGET_PHYS_ADDR_BITS=$hwlib" > $d/config.mak |
echo "QEMU_CFLAGS+=-DTARGET_PHYS_ADDR_BITS=$hwlib" > $d/config.mak |
done |
done |
Line 3815 done
|
Line 3999 done
|
if [ "$source_path" != `pwd` ]; then |
if [ "$source_path" != `pwd` ]; then |
# out of tree build |
# out of tree build |
mkdir -p libcacard |
mkdir -p libcacard |
rm -f libcacard/Makefile |
|
symlink "$source_path/libcacard/Makefile" libcacard/Makefile |
symlink "$source_path/libcacard/Makefile" libcacard/Makefile |
fi |
fi |
|
|
d=libuser |
d=libuser |
mkdir -p $d |
mkdir -p $d |
mkdir -p $d/trace |
mkdir -p $d/trace |
symlink $source_path/Makefile.user $d/Makefile |
mkdir -p $d/qom |
|
symlink "$source_path/Makefile.user" "$d/Makefile" |
|
|
if test "$docs" = "yes" ; then |
if test "$docs" = "yes" ; then |
mkdir -p QMP |
mkdir -p QMP |