configure 141 KB
Newer Older
bellard's avatar
bellard committed
1 2
#!/bin/sh
#
bellard's avatar
bellard committed
3
# qemu configure script (c) 2003 Fabrice Bellard
bellard's avatar
bellard committed
4
#
5

6 7 8 9 10
# Unset some variables known to interfere with behavior of common tools,
# just as autoconf does.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS

11 12 13 14 15 16 17 18 19 20 21
# Temporary directory used for files created while
# configure runs. Since it is in the build directory
# we can safely blow away any previous version of it
# (and we need not jump through hoops to try to delete
# it when configure exits.)
TMPDIR1="config-temp"
rm -rf "${TMPDIR1}"
mkdir -p "${TMPDIR1}"
if [ $? -ne 0 ]; then
    echo "ERROR: failed to create temporary directory"
    exit 1
bellard's avatar
bellard committed
22 23
fi

24 25
TMPB="qemu-conf"
TMPC="${TMPDIR1}/${TMPB}.c"
26
TMPO="${TMPDIR1}/${TMPB}.o"
27
TMPCXX="${TMPDIR1}/${TMPB}.cxx"
28 29
TMPL="${TMPDIR1}/${TMPB}.lo"
TMPA="${TMPDIR1}/lib${TMPB}.la"
30
TMPE="${TMPDIR1}/${TMPB}.exe"
bellard's avatar
bellard committed
31

Gerd Hoffmann's avatar
Gerd Hoffmann committed
32
rm -f config.log
33

34 35
# Print a helpful header at the top of config.log
echo "# QEMU configure log $(date)" >> config.log
36 37 38
printf "# Configured with:" >> config.log
printf " '%s'" "$0" "$@" >> config.log
echo >> config.log
39 40
echo "#" >> config.log

41 42 43 44 45 46 47 48 49 50 51
error_exit() {
    echo
    echo "ERROR: $1"
    while test -n "$2"; do
        echo "       $2"
        shift
    done
    echo
    exit 1
}

52 53 54 55 56 57 58
do_compiler() {
    # Run the compiler, capturing its output to the log. First argument
    # is compiler binary to execute.
    local compiler="$1"
    shift
    echo $compiler "$@" >> config.log
    $compiler "$@" >> config.log 2>&1 || return $?
59 60 61 62 63 64 65 66 67 68 69 70 71
    # Test passed. If this is an --enable-werror build, rerun
    # the test with -Werror and bail out if it fails. This
    # makes warning-generating-errors in configure test code
    # obvious to developers.
    if test "$werror" != "yes"; then
        return 0
    fi
    # Don't bother rerunning the compile if we were already using -Werror
    case "$*" in
        *-Werror*)
           return 0
        ;;
    esac
72 73
    echo $compiler -Werror "$@" >> config.log
    $compiler -Werror "$@" >> config.log 2>&1 && return $?
74 75 76 77
    error_exit "configure test passed without -Werror but failed with -Werror." \
        "This is probably a bug in the configure script. The failing command" \
        "will be at the bottom of config.log." \
        "You can run configure with --disable-werror to bypass this check."
78 79
}

80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
do_cc() {
    do_compiler "$cc" "$@"
}

do_cxx() {
    do_compiler "$cxx" "$@"
}

update_cxxflags() {
    # Set QEMU_CXXFLAGS from QEMU_CFLAGS by filtering out those
    # options which some versions of GCC's C++ compiler complain about
    # because they only make sense for C programs.
    QEMU_CXXFLAGS=
    for arg in $QEMU_CFLAGS; do
        case $arg in
            -Wstrict-prototypes|-Wmissing-prototypes|-Wnested-externs|\
            -Wold-style-declaration|-Wold-style-definition|-Wredundant-decls)
                ;;
            *)
                QEMU_CXXFLAGS=${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }$arg
                ;;
        esac
    done
}

105
compile_object() {
106
  do_cc $QEMU_CFLAGS -c -o $TMPO $TMPC
107 108 109 110 111
}

compile_prog() {
  local_cflags="$1"
  local_ldflags="$2"
112
  do_cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags
113 114
}

115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
do_libtool() {
    local mode=$1
    shift
    # Run the compiler, capturing its output to the log.
    echo $libtool $mode --tag=CC $cc "$@" >> config.log
    $libtool $mode --tag=CC $cc "$@" >> config.log 2>&1 || return $?
    # Test passed. If this is an --enable-werror build, rerun
    # the test with -Werror and bail out if it fails. This
    # makes warning-generating-errors in configure test code
    # obvious to developers.
    if test "$werror" != "yes"; then
        return 0
    fi
    # Don't bother rerunning the compile if we were already using -Werror
    case "$*" in
        *-Werror*)
           return 0
        ;;
    esac
    echo $libtool $mode --tag=CC $cc -Werror "$@" >> config.log
    $libtool $mode --tag=CC $cc -Werror "$@" >> config.log 2>&1 && return $?
    error_exit "configure test passed without -Werror but failed with -Werror." \
        "This is probably a bug in the configure script. The failing command" \
        "will be at the bottom of config.log." \
        "You can run configure with --disable-werror to bypass this check."
}

libtool_prog() {
    do_libtool --mode=compile $QEMU_CFLAGS -c -fPIE -DPIE -o $TMPO $TMPC || return $?
    do_libtool --mode=link $LDFLAGS -o $TMPA $TMPL -rpath /usr/local/lib
}

147 148
# symbolically link $1 to $2.  Portable version of "ln -sf".
symlink() {
149
  rm -rf "$2"
150
  mkdir -p "$(dirname "$2")"
151
  ln -s "$1" "$2"
152 153
}

154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
# check whether a command is available to this shell (may be either an
# executable or a builtin)
has() {
    type "$1" >/dev/null 2>&1
}

# search for an executable in PATH
path_of() {
    local_command="$1"
    local_ifs="$IFS"
    local_dir=""

    # pathname has a dir component?
    if [ "${local_command#*/}" != "$local_command" ]; then
        if [ -x "$local_command" ] && [ ! -d "$local_command" ]; then
            echo "$local_command"
            return 0
        fi
    fi
    if [ -z "$local_command" ]; then
        return 1
    fi

    IFS=:
    for local_dir in $PATH; do
        if [ -x "$local_dir/$local_command" ] && [ ! -d "$local_dir/$local_command" ]; then
            echo "$local_dir/$local_command"
            IFS="${local_ifs:-$(printf ' \t\n')}"
            return 0
        fi
    done
    # not found
    IFS="${local_ifs:-$(printf ' \t\n')}"
    return 1
}

190 191 192 193
have_backend () {
    echo "$trace_backends" | grep "$1" >/dev/null
}

bellard's avatar
bellard committed
194
# default parameters
195
source_path=`dirname "$0"`
196
cpu=""
197
iasl="iasl"
198
interp_prefix="/usr/gnemul/qemu-%M"
bellard's avatar
bellard committed
199
static="no"
bellard's avatar
bellard committed
200
cross_prefix=""
201
audio_drv_list=""
202 203
block_drv_rw_whitelist=""
block_drv_ro_whitelist=""
204
host_cc="cc"
205
libs_softmmu=""
Juan Quintela's avatar
Juan Quintela committed
206
libs_tools=""
207
audio_pt_int=""
208
audio_win_int=""
209
cc_i386=i386-pc-linux-gnu-gcc
210
libs_qga=""
211
debug_info="yes"
212
stack_protector=""
213

214 215
# Don't accept a target_list environment variable.
unset target_list
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234

# Default value for a variable defining feature "foo".
#  * foo="no"  feature will only be used if --enable-foo arg is given
#  * foo=""    feature will be searched for, and if found, will be used
#              unless --disable-foo is given
#  * foo="yes" this value will only be set by --enable-foo flag.
#              feature will searched for,
#              if not found, configure exits with error
#
# Always add --enable-foo and --disable-foo command line args.
# Distributions want to ensure that several features are compiled in, and it
# is impossible without a --enable-foo that exits if a feature is not found.

bluez=""
brlapi=""
curl=""
curses=""
docs=""
fdt=""
235
netmap="no"
236
pixman=""
237
sdl=""
238
sdlabi="1.2"
239
virtfs=""
Jes Sorensen's avatar
Jes Sorensen committed
240
vnc="yes"
241 242 243 244 245 246 247
sparse="no"
uuid=""
vde=""
vnc_tls=""
vnc_sasl=""
vnc_jpeg=""
vnc_png=""
248
vnc_ws=""
249
xen=""
250
xen_ctrl_version=""
251
xen_pci_passthrough=""
252
linux_aio=""
253
cap_ng=""
254
attr=""
255
libattr=""
256 257
xfs=""

258
vhost_net="no"
259
vhost_scsi="no"
260
kvm="no"
Michael R. Hines's avatar
Michael R. Hines committed
261
rdma=""
262 263 264 265
gprof="no"
debug_tcg="no"
debug="no"
strip_opt="yes"
266
tcg_interpreter="no"
267 268
bigendian="no"
mingw32="no"
Blue Swirl's avatar
Blue Swirl committed
269 270
gcov="no"
gcov_tool="gcov"
271
EXESUF=""
272 273 274
DSOSUF=".so"
LDFLAGS_SHARED="-shared"
modules="no"
275 276
prefix="/usr/local"
mandir="\${prefix}/share/man"
277
datadir="\${prefix}/share"
278
qemu_docdir="\${prefix}/share/doc/qemu"
279
bindir="\${prefix}/bin"
280
libdir="\${prefix}/lib"
281
libexecdir="\${prefix}/libexec"
282
includedir="\${prefix}/include"
283
sysconfdir="\${prefix}/etc"
284
local_statedir="\${prefix}/var"
285 286 287 288 289 290 291 292 293 294 295 296 297
confsuffix="/qemu"
slirp="yes"
fmod_lib=""
fmod_inc=""
oss_lib=""
bsd="no"
linux="no"
solaris="no"
profiler="no"
cocoa="no"
softmmu="yes"
linux_user="no"
bsd_user="no"
298
guest_base="yes"
299 300 301
aix="no"
blobs="yes"
pkgversion=""
302
pie=""
303
zero_malloc=""
304
qom_cast_debug="yes"
305
trace_backends="nop"
306 307 308
trace_file="trace"
spice=""
rbd=""
309
smartcard_nss=""
Gerd Hoffmann's avatar
Gerd Hoffmann committed
310
libusb=""
311
usb_redir=""
312
glx=""
313
zlib="yes"
314 315
lzo=""
snappy=""
316
guest_agent=""
317 318 319
guest_agent_with_vss="no"
vss_win32_sdk=""
win_sdk="no"
320
want_tools="yes"
Ronnie Sahlberg's avatar
Ronnie Sahlberg committed
321
libiscsi=""
322
libnfs=""
323
coroutine=""
324
coroutine_pool=""
325
seccomp=""
326
glusterfs=""
327
glusterfs_discard="no"
328
glusterfs_zerofill="no"
329
archipelago=""
330
gtk=""
331
gtkabi=""
332
vte=""
333
tpm="yes"
334
libssh2=""
335
vhdx=""
336
quorum=""
337
numa=""
338

339 340 341 342 343 344
# parse CC options first
for opt do
  optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
  case "$opt" in
  --cross-prefix=*) cross_prefix="$optarg"
  ;;
345
  --cc=*) CC="$optarg"
346
  ;;
347 348
  --cxx=*) CXX="$optarg"
  ;;
349 350
  --source-path=*) source_path="$optarg"
  ;;
351 352
  --cpu=*) cpu="$optarg"
  ;;
353
  --extra-cflags=*) QEMU_CFLAGS="$optarg $QEMU_CFLAGS"
354
                    EXTRA_CFLAGS="$optarg"
355 356
  ;;
  --extra-ldflags=*) LDFLAGS="$optarg $LDFLAGS"
357
                     EXTRA_LDFLAGS="$optarg"
358
  ;;
359 360 361 362
  --enable-debug-info) debug_info="yes"
  ;;
  --disable-debug-info) debug_info="no"
  ;;
363 364 365 366
  esac
done
# OS specific
# Using uname is really, really broken.  Once we have the right set of checks
367
# we can eliminate its usage altogether.
368

369 370 371 372 373 374 375 376 377 378
# Preferred compiler:
#  ${CC} (if set)
#  ${cross_prefix}gcc (if cross-prefix specified)
#  system compiler
if test -z "${CC}${cross_prefix}"; then
  cc="$host_cc"
else
  cc="${CC-${cross_prefix}gcc}"
fi

379 380 381 382 383 384
if test -z "${CXX}${cross_prefix}"; then
  cxx="c++"
else
  cxx="${CXX-${cross_prefix}g++}"
fi

385
ar="${AR-${cross_prefix}ar}"
386 387
as="${AS-${cross_prefix}as}"
cpp="${CPP-$cc -E}"
388 389
objcopy="${OBJCOPY-${cross_prefix}objcopy}"
ld="${LD-${cross_prefix}ld}"
Brad's avatar
Brad committed
390
libtool="${LIBTOOL-${cross_prefix}libtool}"
391
nm="${NM-${cross_prefix}nm}"
392 393
strip="${STRIP-${cross_prefix}strip}"
windres="${WINDRES-${cross_prefix}windres}"
394 395 396 397 398
pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
query_pkg_config() {
    "${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@"
}
pkg_config=query_pkg_config
399
sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
400
sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"
401

402 403 404
# If the user hasn't specified ARFLAGS, default to 'rv', just as make does.
ARFLAGS="${ARFLAGS-rv}"

405
# default flags for all hosts
406
QEMU_CFLAGS="-fno-strict-aliasing -fno-common $QEMU_CFLAGS"
407
QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
408
QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
409
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
410
QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/include"
411 412 413 414
if test "$debug_info" = "yes"; then
    CFLAGS="-g $CFLAGS"
    LDFLAGS="-g $LDFLAGS"
fi
415

416 417 418
# make source path absolute
source_path=`cd "$source_path"; pwd`

419 420 421 422 423 424 425 426
# running configure in the source tree?
# we know that's the case if configure is there.
if test -f "./configure"; then
    pwd_is_source_path="y"
else
    pwd_is_source_path="n"
fi

427 428 429
check_define() {
cat > $TMPC <<EOF
#if !defined($1)
430
#error $1 not defined
431 432 433
#endif
int main(void) { return 0; }
EOF
434
  compile_object
435 436
}

437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471
if check_define __linux__ ; then
  targetos="Linux"
elif check_define _WIN32 ; then
  targetos='MINGW32'
elif check_define __OpenBSD__ ; then
  targetos='OpenBSD'
elif check_define __sun__ ; then
  targetos='SunOS'
elif check_define __HAIKU__ ; then
  targetos='Haiku'
else
  targetos=`uname -s`
fi

# Some host OSes need non-standard checks for which CPU to use.
# Note that these checks are broken for cross-compilation: if you're
# cross-compiling to one of these OSes then you'll need to specify
# the correct CPU with the --cpu option.
case $targetos in
Darwin)
  # on Leopard most of the system is 32-bit, so we have to ask the kernel if we can
  # run 64-bit userspace code.
  # If the user didn't specify a CPU explicitly and the kernel says this is
  # 64 bit hw, then assume x86_64. Otherwise fall through to the usual detection code.
  if test -z "$cpu" && test "$(sysctl -n hw.optional.x86_64)" = "1"; then
    cpu="x86_64"
  fi
  ;;
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"
  fi
esac

472 473 474 475
if test ! -z "$cpu" ; then
  # command line argument
  :
elif check_define __i386__ ; then
476 477
  cpu="i386"
elif check_define __x86_64__ ; then
478 479 480 481 482
  if check_define __ILP32__ ; then
    cpu="x32"
  else
    cpu="x86_64"
  fi
blueswir1's avatar
blueswir1 committed
483 484 485 486 487 488
elif check_define __sparc__ ; then
  if check_define __arch64__ ; then
    cpu="sparc64"
  else
    cpu="sparc"
  fi
malc's avatar
malc committed
489 490 491 492 493 494
elif check_define _ARCH_PPC ; then
  if check_define _ARCH_PPC64 ; then
    cpu="ppc64"
  else
    cpu="ppc"
  fi
495 496
elif check_define __mips__ ; then
  cpu="mips"
497 498
elif check_define __ia64__ ; then
  cpu="ia64"
499 500 501 502 503 504
elif check_define __s390__ ; then
  if check_define __s390x__ ; then
    cpu="s390x"
  else
    cpu="s390"
  fi
505 506
elif check_define __arm__ ; then
  cpu="arm"
507 508
elif check_define __aarch64__ ; then
  cpu="aarch64"
509 510
elif check_define __hppa__ ; then
  cpu="hppa"
511
else
malc's avatar
malc committed
512
  cpu=`uname -m`
513 514
fi

515 516 517
ARCH=
# Normalise host CPU name and set ARCH.
# Note that this case should only have supported host CPUs, not guests.
bellard's avatar
bellard committed
518
case "$cpu" in
519
  ia64|ppc|ppc64|s390|s390x|sparc64|x32)
520 521
    cpu="$cpu"
  ;;
bellard's avatar
bellard committed
522
  i386|i486|i586|i686|i86pc|BePC)
523
    cpu="i386"
bellard's avatar
bellard committed
524
  ;;
aurel32's avatar
aurel32 committed
525 526 527
  x86_64|amd64)
    cpu="x86_64"
  ;;
528 529
  armv*b|armv*l|arm)
    cpu="arm"
bellard's avatar
bellard committed
530
  ;;
531 532 533
  aarch64)
    cpu="aarch64"
  ;;
534 535 536
  mips*)
    cpu="mips"
  ;;
537
  sparc|sun4[cdmuv])
bellard's avatar
bellard committed
538 539
    cpu="sparc"
  ;;
bellard's avatar
bellard committed
540
  *)
541 542
    # This will result in either an error or falling back to TCI later
    ARCH=unknown
bellard's avatar
bellard committed
543 544
  ;;
esac
545 546 547
if test -z "$ARCH"; then
  ARCH="$cpu"
fi
548

bellard's avatar
bellard committed
549
# OS specific
550

551 552 553
# host *BSD for user mode
HOST_VARIANT_DIR=""

bellard's avatar
bellard committed
554
case $targetos in
555
CYGWIN*)
556
  mingw32="yes"
557
  QEMU_CFLAGS="-mno-cygwin $QEMU_CFLAGS"
558 559
  audio_possible_drivers="winwave sdl"
  audio_drv_list="winwave"
560
;;
561
MINGW32*)
562
  mingw32="yes"
563 564
  audio_possible_drivers="winwave dsound sdl fmod"
  audio_drv_list="winwave"
565
;;
566
GNU/kFreeBSD)
567
  bsd="yes"
568 569
  audio_drv_list="oss"
  audio_possible_drivers="oss sdl esd pa"
570
;;
bellard's avatar
bellard committed
571
FreeBSD)
572
  bsd="yes"
573
  make="${MAKE-gmake}"
574 575
  audio_drv_list="oss"
  audio_possible_drivers="oss sdl esd pa"
576 577
  # needed for kinfo_getvmmap(3) in libutil.h
  LIBS="-lutil $LIBS"
578
  netmap=""  # enable netmap autodetect
579
  HOST_VARIANT_DIR="freebsd"
bellard's avatar
bellard committed
580
;;
581
DragonFly)
582
  bsd="yes"
583
  make="${MAKE-gmake}"
584 585
  audio_drv_list="oss"
  audio_possible_drivers="oss sdl esd pa"
586
  HOST_VARIANT_DIR="dragonfly"
587
;;
bellard's avatar
bellard committed
588
NetBSD)
589
  bsd="yes"
590
  make="${MAKE-gmake}"
591 592 593
  audio_drv_list="oss"
  audio_possible_drivers="oss sdl esd"
  oss_lib="-lossaudio"
594
  HOST_VARIANT_DIR="netbsd"
bellard's avatar
bellard committed
595 596
;;
OpenBSD)
597
  bsd="yes"
598
  make="${MAKE-gmake}"
599 600
  audio_drv_list="sdl"
  audio_possible_drivers="sdl esd"
601
  HOST_VARIANT_DIR="openbsd"
bellard's avatar
bellard committed
602
;;
603
Darwin)
604 605
  bsd="yes"
  darwin="yes"
606
  LDFLAGS_SHARED="-bundle -undefined dynamic_lookup"
607
  if [ "$cpu" = "x86_64" ] ; then
608
    QEMU_CFLAGS="-arch x86_64 $QEMU_CFLAGS"
609
    LDFLAGS="-arch x86_64 $LDFLAGS"
610 611 612 613 614
  fi
  cocoa="yes"
  audio_drv_list="coreaudio"
  audio_possible_drivers="coreaudio sdl fmod"
  LDFLAGS="-framework CoreFoundation -framework IOKit $LDFLAGS"
615
  libs_softmmu="-F/System/Library/Frameworks -framework Cocoa -framework IOKit $libs_softmmu"
616 617 618
  # 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"
619
  HOST_VARIANT_DIR="darwin"
620
;;
bellard's avatar
bellard committed
621
SunOS)
622
  solaris="yes"
623 624
  make="${MAKE-gmake}"
  install="${INSTALL-ginstall}"
625
  ld="gld"
626
  smbd="${SMBD-/usr/sfw/sbin/smbd}"
627 628 629 630 631 632
  needs_libsunmath="no"
  solarisrev=`uname -r | cut -f2 -d.`
  if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
    if test "$solarisrev" -le 9 ; then
      if test -f /opt/SUNWspro/prod/lib/libsunmath.so.1; then
        needs_libsunmath="yes"
633 634 635
        QEMU_CFLAGS="-I/opt/SUNWspro/prod/include/cc $QEMU_CFLAGS"
        LDFLAGS="-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib $LDFLAGS"
        LIBS="-lsunmath $LIBS"
636
      else
637 638 639 640
        error_exit "QEMU will not link correctly on Solaris 8/X86 or 9/x86 without" \
            "libsunmath from the Sun Studio compilers tools, due to a lack of" \
            "C99 math features in libm.so in Solaris 8/x86 and Solaris 9/x86" \
            "Studio 11 can be downloaded from www.sun.com."
641
      fi
ths's avatar
ths committed
642
    fi
643 644 645 646 647
  fi
  if test -f /usr/include/sys/soundcard.h ; then
    audio_drv_list="oss"
  fi
  audio_possible_drivers="oss sdl"
648 649 650 651
# needed for CMSG_ macros in sys/socket.h
  QEMU_CFLAGS="-D_XOPEN_SOURCE=600 $QEMU_CFLAGS"
# needed for TIOCWIN* defines in termios.h
  QEMU_CFLAGS="-D__EXTENSIONS__ $QEMU_CFLAGS"
652
  QEMU_CFLAGS="-std=gnu99 $QEMU_CFLAGS"
653 654 655
  solarisnetlibs="-lsocket -lnsl -lresolv"
  LIBS="$solarisnetlibs $LIBS"
  libs_qga="$solarisnetlibs $libs_qga"
ths's avatar
ths committed
656
;;
malc's avatar
malc committed
657
AIX)
658
  aix="yes"
659
  make="${MAKE-gmake}"
malc's avatar
malc committed
660
;;
661 662 663 664 665
Haiku)
  haiku="yes"
  QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS $QEMU_CFLAGS"
  LIBS="-lposix_error_mapper -lnetwork $LIBS"
;;
666
*)
667 668 669 670
  audio_drv_list="oss"
  audio_possible_drivers="oss alsa sdl esd pa"
  linux="yes"
  linux_user="yes"
671 672
  kvm="yes"
  vhost_net="yes"
673
  vhost_scsi="yes"
674
  if [ "$cpu" = "i386" -o "$cpu" = "x86_64" -o "$cpu" = "x32" ] ; then
675
    audio_possible_drivers="$audio_possible_drivers fmod"
676
  fi
677
  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers $QEMU_INCLUDES"
678
;;
bellard's avatar
bellard committed
679 680
esac

bellard's avatar
bellard committed
681
if [ "$bsd" = "yes" ] ; then
682
  if [ "$darwin" != "yes" ] ; then
683
    bsd_user="yes"
684
  fi
bellard's avatar
bellard committed
685 686
fi

687 688
: ${make=${MAKE-make}}
: ${install=${INSTALL-install}}
689
: ${python=${PYTHON-python}}
690
: ${smbd=${SMBD-/usr/sbin/smbd}}
691

692 693 694 695 696 697 698
# Default objcc to clang if available, otherwise use CC
if has clang; then
  objcc=clang
else
  objcc="$cc"
fi

699 700
if test "$mingw32" = "yes" ; then
  EXESUF=".exe"
701
  DSOSUF=".dll"
702
  QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS"
703 704
  # enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later)
  QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS"
705 706 707 708 709 710 711
  LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
  if compile_prog "" "-liberty" ; then
    LIBS="-liberty $LIBS"
  fi
712
  prefix="c:/Program Files/QEMU"
713
  mandir="\${prefix}"
714
  datadir="\${prefix}"
715
  qemu_docdir="\${prefix}"
716 717
  bindir="\${prefix}"
  sysconfdir="\${prefix}"
718
  local_statedir=
719
  confsuffix=""
720
  libs_qga="-lws2_32 -lwinmm -lpowrprof $libs_qga"
721 722
fi

723
werror=""
724

bellard's avatar
bellard committed
725
for opt do
pbrook's avatar
pbrook committed
726
  optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
bellard's avatar
bellard committed
727
  case "$opt" in
728 729
  --help|-h) show_help=yes
  ;;
730 731
  --version|-V) exec cat $source_path/VERSION
  ;;
732
  --prefix=*) prefix="$optarg"
bellard's avatar
bellard committed
733
  ;;
734
  --interp-prefix=*) interp_prefix="$optarg"
bellard's avatar
bellard committed
735
  ;;
736
  --source-path=*)
bellard's avatar
bellard committed
737
  ;;
738
  --cross-prefix=*)
bellard's avatar
bellard committed
739
  ;;
740
  --cc=*)
bellard's avatar
bellard committed
741
  ;;
742
  --host-cc=*) host_cc="$optarg"
bellard's avatar
bellard committed
743
  ;;
744 745
  --cxx=*)
  ;;
746 747
  --iasl=*) iasl="$optarg"
  ;;
748 749
  --objcc=*) objcc="$optarg"
  ;;
750
  --make=*) make="$optarg"
bellard's avatar
bellard committed
751
  ;;
752 753
  --install=*) install="$optarg"
  ;;
754 755
  --python=*) python="$optarg"
  ;;
Blue Swirl's avatar
Blue Swirl committed
756 757
  --gcov=*) gcov_tool="$optarg"
  ;;
758 759
  --smbd=*) smbd="$optarg"
  ;;
760
  --extra-cflags=*)
bellard's avatar
bellard committed
761
  ;;
762
  --extra-ldflags=*)
bellard's avatar
bellard committed
763
  ;;
764 765 766 767
  --enable-debug-info)
  ;;
  --disable-debug-info)
  ;;
768 769 770
  --enable-modules)
      modules="yes"
  ;;
771
  --cpu=*)
bellard's avatar
bellard committed
772
  ;;
773
  --target-list=*) target_list="$optarg"
bellard's avatar
bellard committed
774
  ;;
775 776 777 778
  --enable-trace-backends=*) trace_backends="$optarg"
  ;;
  # XXX: backwards compatibility
  --enable-trace-backend=*) trace_backends="$optarg"
779
  ;;
780
  --with-trace-file=*) trace_file="$optarg"
781
  ;;
bellard's avatar
bellard committed
782 783
  --enable-gprof) gprof="yes"
  ;;
Blue Swirl's avatar
Blue Swirl committed
784 785
  --enable-gcov) gcov="yes"
  ;;
786 787 788
  --static)
    static="yes"
    LDFLAGS="-static $LDFLAGS"
789
    QEMU_PKG_CONFIG_FLAGS="--static $QEMU_PKG_CONFIG_FLAGS"
bellard's avatar
bellard committed
790
  ;;
791 792 793 794
  --mandir=*) mandir="$optarg"
  ;;
  --bindir=*) bindir="$optarg"
  ;;
795 796
  --libdir=*) libdir="$optarg"
  ;;
797 798
  --libexecdir=*) libexecdir="$optarg"
  ;;
799 800
  --includedir=*) includedir="$optarg"
  ;;
801
  --datadir=*) datadir="$optarg"
802
  ;;
803 804
  --with-confsuffix=*) confsuffix="$optarg"
  ;;
805
  --docdir=*) qemu_docdir="$optarg"
806
  ;;
807
  --sysconfdir=*) sysconfdir="$optarg"
808
  ;;
809 810 811
  --localstatedir=*) local_statedir="$optarg"
  ;;
  --sbindir=*|--sharedstatedir=*|\
812 813 814 815 816 817 818
  --oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\
  --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
    # These switches are silently ignored, for compatibility with
    # autoconf-generated configure scripts. This allows QEMU's
    # configure to be used by RPM and similar macros that set
    # lots of directory switches by default.
  ;;
819 820 821 822
  --with-system-pixman) pixman="system"
  ;;
  --without-system-pixman) pixman="internal"
  ;;
823 824
  --without-pixman) pixman="none"
  ;;
825 826
  --disable-sdl) sdl="no"
  ;;
827 828
  --enable-sdl) sdl="yes"
  ;;
829 830
  --with-sdlabi=*) sdlabi="$optarg"
  ;;
831 832 833 834
  --disable-qom-cast-debug) qom_cast_debug="no"
  ;;
  --enable-qom-cast-debug) qom_cast_debug="yes"
  ;;
835 836 837 838
  --disable-virtfs) virtfs="no"
  ;;
  --enable-virtfs) virtfs="yes"
  ;;
Jes Sorensen's avatar
Jes Sorensen committed
839 840 841 842
  --disable-vnc) vnc="no"
  ;;
  --enable-vnc) vnc="yes"
  ;;
843
  --fmod-lib=*) fmod_lib="$optarg"
844
  ;;
845 846
  --fmod-inc=*) fmod_inc="$optarg"
  ;;
blueswir1's avatar
blueswir1 committed
847 848
  --oss-lib=*) oss_lib="$optarg"
  ;;
849
  --audio-drv-list=*) audio_drv_list="$optarg"
bellard's avatar
bellard committed
850
  ;;
851 852 853
  --block-drv-rw-whitelist=*|--block-drv-whitelist=*) block_drv_rw_whitelist=`echo "$optarg" | sed -e 's/,/ /g'`
  ;;
  --block-drv-ro-whitelist=*) block_drv_ro_whitelist=`echo "$optarg" | sed -e 's/,/ /g'`
854
  ;;
855 856 857 858
  --enable-debug-tcg) debug_tcg="yes"
  ;;
  --disable-debug-tcg) debug_tcg="no"
  ;;
Paul Brook's avatar
Paul Brook committed
859 860 861 862 863 864
  --enable-debug)
      # Enable debugging options that aren't excessively noisy
      debug_tcg="yes"
      debug="yes"
      strip_opt="no"
  ;;
865 866 867 868
  --enable-sparse) sparse="yes"
  ;;
  --disable-sparse) sparse="no"
  ;;
869 870
  --disable-strip) strip_opt="no"
  ;;
871 872
  --disable-vnc-tls) vnc_tls="no"
  ;;
873 874
  --enable-vnc-tls) vnc_tls="yes"
  ;;
875 876
  --disable-vnc-sasl) vnc_sasl="no"
  ;;
877 878
  --enable-vnc-sasl) vnc_sasl="yes"
  ;;
879 880 881 882
  --disable-vnc-jpeg) vnc_jpeg="no"
  ;;
  --enable-vnc-jpeg) vnc_jpeg="yes"
  ;;
883 884 885 886
  --disable-vnc-png) vnc_png="no"
  ;;
  --enable-vnc-png) vnc_png="yes"
  ;;
887 888 889 890
  --disable-vnc-ws) vnc_ws="no"
  ;;
  --enable-vnc-ws) vnc_ws="yes"
  ;;
bellard's avatar
bellard committed
891
  --disable-slirp) slirp="no"
892
  ;;
893 894 895 896
  --disable-uuid) uuid="no"
  ;;
  --enable-uuid) uuid="yes"
  ;;
897
  --disable-vde) vde="no"
898
  ;;
899 900
  --enable-vde) vde="yes"
  ;;
901 902 903 904
  --disable-netmap) netmap="no"
  ;;
  --enable-netmap) netmap="yes"
  ;;
905 906
  --disable-xen) xen="no"
  ;;
907 908
  --enable-xen) xen="yes"
  ;;
909 910 911 912
  --disable-xen-pci-passthrough) xen_pci_passthrough="no"
  ;;
  --enable-xen-pci-passthrough) xen_pci_passthrough="yes"
  ;;
aurel32's avatar
aurel32 committed
913 914
  --disable-brlapi) brlapi="no"
  ;;
915 916
  --enable-brlapi) brlapi="yes"
  ;;
917 918
  --disable-bluez) bluez="no"
  ;;
919 920
  --enable-bluez) bluez="yes"
  ;;
aliguori's avatar
aliguori committed
921 922
  --disable-kvm) kvm="no"
  ;;
923 924
  --enable-kvm) kvm="yes"
  ;;
925 926 927 928
  --disable-tcg-interpreter) tcg_interpreter="no"
  ;;
  --enable-tcg-interpreter) tcg_interpreter="yes"
  ;;
929 930 931 932
  --disable-cap-ng)  cap_ng="no"
  ;;
  --enable-cap-ng) cap_ng="yes"
  ;;
933 934 935 936
  --disable-spice) spice="no"
  ;;
  --enable-spice) spice="yes"
  ;;
Ronnie Sahlberg's avatar
Ronnie Sahlberg committed
937 938 939 940
  --disable-libiscsi) libiscsi="no"
  ;;
  --enable-libiscsi) libiscsi="yes"
  ;;
941 942 943 944
  --disable-libnfs) libnfs="no"
  ;;
  --enable-libnfs) libnfs="yes"
  ;;
945 946
  --enable-profiler) profiler="yes"
  ;;
947 948
  --disable-cocoa) cocoa="no"
  ;;
949 950 951 952
  --enable-cocoa)
      cocoa="yes" ;
      sdl="no" ;
      audio_drv_list="coreaudio `echo $audio_drv_list | sed s,coreaudio,,g`"
953
  ;;
954
  --disable-system) softmmu="no"
955
  ;;
956
  --enable-system) softmmu="yes"
957
  ;;
958 959 960 961 962
  --disable-user)
      linux_user="no" ;
      bsd_user="no" ;
  ;;
  --enable-user) ;;
963
  --disable-linux-user) linux_user="no"
964
  ;;
965 966
  --enable-linux-user) linux_user="yes"
  ;;
967 968 969 970
  --disable-bsd-user) bsd_user="no"
  ;;
  --enable-bsd-user) bsd_user="yes"
  ;;
971 972 973 974
  --enable-guest-base) guest_base="yes"
  ;;
  --disable-guest-base) guest_base="no"
  ;;
975
  --enable-pie) pie="yes"
976
  ;;
977
  --disable-pie) pie="no"
978
  ;;
979 980 981 982
  --enable-werror) werror="yes"
  ;;
  --disable-werror) werror="no"
  ;;
983 984 985 986
  --enable-stack-protector) stack_protector="yes"
  ;;
  --disable-stack-protector) stack_protector="no"
  ;;
balrog's avatar
balrog committed
987 988
  --disable-curses) curses="no"
  ;;
989 990
  --enable-curses) curses="yes"
  ;;
991 992
  --disable-curl) curl="no"
  ;;
993 994
  --enable-curl) curl="yes"
  ;;
995 996 997 998
  --disable-fdt) fdt="no"
  ;;
  --enable-fdt) fdt="yes"
  ;;
999 1000 1001 1002
  --disable-linux-aio) linux_aio="no"
  ;;
  --enable-linux-aio) linux_aio="yes"
  ;;
1003 1004 1005 1006
  --disable-attr) attr="no"
  ;;
  --enable-attr) attr="yes"
  ;;
1007 1008
  --disable-blobs) blobs="no"
  ;;
pbrook's avatar
pbrook committed
1009 1010
  --with-pkgversion=*) pkgversion=" ($optarg)"
  ;;
1011 1012
  --with-coroutine=*) coroutine="$optarg"
  ;;
1013 1014 1015 1016
  --disable-coroutine-pool) coroutine_pool="no"
  ;;
  --enable-coroutine-pool) coroutine_pool="yes"
  ;;
1017
  --disable-docs) docs="no"
1018
  ;;
1019
  --enable-docs) docs="yes"
1020
  ;;
1021 1022 1023 1024
  --disable-vhost-net) vhost_net="no"
  ;;
  --enable-vhost-net) vhost_net="yes"
  ;;
1025 1026 1027 1028
  --disable-vhost-scsi) vhost_scsi="no"
  ;;
  --enable-vhost-scsi) vhost_scsi="yes"
  ;;
1029
  --disable-glx) glx="no"
1030
  ;;
1031
  --enable-glx) glx="yes"
1032
  ;;
1033 1034 1035 1036
  --disable-rbd) rbd="no"
  ;;
  --enable-rbd) rbd="yes"
  ;;
1037 1038 1039 1040
  --disable-xfsctl) xfs="no"
  ;;
  --enable-xfsctl) xfs="yes"
  ;;
1041 1042 1043 1044
  --disable-smartcard-nss) smartcard_nss="no"
  ;;
  --enable-smartcard-nss) smartcard_nss="yes"
  ;;
Gerd Hoffmann's avatar
Gerd Hoffmann committed
1045 1046 1047 1048
  --disable-libusb) libusb="no"
  ;;
  --enable-libusb) libusb="yes"
  ;;
1049 1050 1051 1052
  --disable-usb-redir) usb_redir="no"
  ;;
  --enable-usb-redir) usb_redir="yes"
  ;;
1053 1054
  --disable-zlib-test) zlib="no"
  ;;
1055 1056
  --disable-lzo) lzo="no"
  ;;
1057 1058
  --enable-lzo) lzo="yes"
  ;;
1059 1060
  --disable-snappy) snappy="no"
  ;;
1061 1062
  --enable-snappy) snappy="yes"
  ;;
1063 1064 1065 1066
  --enable-guest-agent) guest_agent="yes"
  ;;
  --disable-guest-agent) guest_agent="no"
  ;;
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078
  --with-vss-sdk) vss_win32_sdk=""
  ;;
  --with-vss-sdk=*) vss_win32_sdk="$optarg"
  ;;
  --without-vss-sdk) vss_win32_sdk="no"
  ;;
  --with-win-sdk) win_sdk=""
  ;;
  --with-win-sdk=*) win_sdk="$optarg"
  ;;
  --without-win-sdk) win_sdk="no"
  ;;
1079 1080 1081 1082
  --enable-tools) want_tools="yes"
  ;;
  --disable-tools) want_tools="no"
  ;;
1083 1084 1085 1086
  --enable-seccomp) seccomp="yes"
  ;;
  --disable-seccomp) seccomp="no"
  ;;
1087 1088 1089 1090
  --disable-glusterfs) glusterfs="no"
  ;;
  --enable-glusterfs) glusterfs="yes"
  ;;
1091 1092 1093 1094
  --disable-archipelago) archipelago="no"
  ;;
  --enable-archipelago) archipelago="yes"
  ;;
1095 1096
  --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane)
      echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2
1097
  ;;
1098 1099 1100 1101
  --disable-gtk) gtk="no"
  ;;
  --enable-gtk) gtk="yes"
  ;;
Michael R. Hines's avatar
Michael R. Hines committed
1102 1103 1104 1105
  --enable-rdma) rdma="yes"
  ;;
  --disable-rdma) rdma="no"
  ;;
1106 1107
  --with-gtkabi=*) gtkabi="$optarg"
  ;;
1108 1109 1110 1111
  --disable-vte) vte="no"
  ;;
  --enable-vte) vte="yes"
  ;;
1112 1113
  --disable-tpm) tpm="no"
  ;;
1114 1115
  --enable-tpm) tpm="yes"
  ;;
1116 1117 1118 1119
  --disable-libssh2) libssh2="no"
  ;;
  --enable-libssh2) libssh2="yes"
  ;;
1120 1121 1122 1123
  --enable-vhdx) vhdx="yes"
  ;;
  --disable-vhdx) vhdx="no"
  ;;
1124 1125 1126 1127
  --disable-quorum) quorum="no"
  ;;
  --enable-quorum) quorum="yes"
  ;;
1128 1129 1130 1131
  --disable-numa) numa="no"
  ;;
  --enable-numa) numa="yes"
  ;;
1132 1133 1134 1135
  *)
      echo "ERROR: unknown option $opt"
      echo "Try '$0 --help' for more information"
      exit 1
1136
  ;;
bellard's avatar
bellard committed
1137 1138 1139
  esac
done

1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158
if ! has $python; then
  error_exit "Python not found. Use --python=/path/to/python"
fi

# Note that if the Python conditional here evaluates True we will exit
# 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
  error_exit "Cannot use '$python', Python 2.4 or later is required." \
      "Note that Python 3 or later is not yet supported." \
      "Use --python=/path/to/python to specify a supported Python."
fi

# The -B switch was added in Python 2.6.
# If it is supplied, compiled files are not written.
# Use it for Python versions which support it.
if $python -B -c 'import sys; sys.exit(0)' 2>/dev/null; then
  python="$python -B"
fi

1159
case "$cpu" in
1160 1161 1162 1163 1164 1165 1166 1167
    ppc)
           CPU_CFLAGS="-m32"
           LDFLAGS="-m32 $LDFLAGS"
           ;;
    ppc64)
           CPU_CFLAGS="-m64"
           LDFLAGS="-m64 $LDFLAGS"
           ;;
1168
    sparc)
1169
           LDFLAGS="-m32 $LDFLAGS"
1170
           CPU_CFLAGS="-m32 -mcpu=ultrasparc"
1171
           ;;
1172 1173
    sparc64)
           LDFLAGS="-m64 $LDFLAGS"
1174
           CPU_CFLAGS="-m64 -mcpu=ultrasparc"
1175
           ;;
1176
    s390)
1177
           CPU_CFLAGS="-m31"
1178 1179 1180
           LDFLAGS="-m31 $LDFLAGS"
           ;;
    s390x)
1181
           CPU_CFLAGS="-m64"
1182
           LDFLAGS="-m64 $LDFLAGS"
1183
           ;;
1184
    i386)
1185
           CPU_CFLAGS="-m32"
1186
           LDFLAGS="-m32 $LDFLAGS"
1187
           cc_i386='$(CC) -m32'
1188 1189
           ;;
    x86_64)
1190
           CPU_CFLAGS="-m64"
1191
           LDFLAGS="-m64 $LDFLAGS"
1192
           cc_i386='$(CC) -m32'
1193
           ;;
1194 1195 1196 1197 1198
    x32)
           CPU_CFLAGS="-mx32"
           LDFLAGS="-mx32 $LDFLAGS"
           cc_i386='$(CC) -m32'
           ;;
1199
    # No special flags required for other host CPUs
1200 1201
esac

1202 1203 1204
QEMU_CFLAGS="$CPU_CFLAGS $QEMU_CFLAGS"
EXTRA_CFLAGS="$CPU_CFLAGS $EXTRA_CFLAGS"

1205 1206
default_target_list=""

1207 1208 1209 1210
mak_wilds=""

if [ "$softmmu" = "yes" ]; then
    mak_wilds="${mak_wilds} $source_path/default-configs/*-softmmu.mak"
1211
fi
1212 1213
if [ "$linux_user" = "yes" ]; then
    mak_wilds="${mak_wilds} $source_path/default-configs/*-linux-user.mak"
1214
fi
1215 1216
if [ "$bsd_user" = "yes" ]; then
    mak_wilds="${mak_wilds} $source_path/default-configs/*-bsd-user.mak"
1217 1218
fi

1219 1220 1221 1222
for config in $mak_wilds; do
    default_target_list="${default_target_list} $(basename "$config" .mak)"
done

1223 1224 1225 1226 1227 1228
if test x"$show_help" = x"yes" ; then
cat << EOF

Usage: configure [options]
Options: [defaults in brackets after descriptions]

1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260
Standard options:
  --help                   print this message
  --prefix=PREFIX          install in PREFIX [$prefix]
  --interp-prefix=PREFIX   where to find shared libraries, etc.
                           use %M for cpu name [$interp_prefix]
  --target-list=LIST       set target list (default: build everything)
$(echo Available targets: $default_target_list | \
  fold -s -w 53 | sed -e 's/^/                           /')

Advanced options (experts only):
  --source-path=PATH       path of source code [$source_path]
  --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]
  --cc=CC                  use C compiler CC [$cc]
  --iasl=IASL              use ACPI compiler IASL [$iasl]
  --host-cc=CC             use C compiler CC [$host_cc] for code run at
                           build time
  --cxx=CXX                use C++ compiler CXX [$cxx]
  --objcc=OBJCC            use Objective-C compiler OBJCC [$objcc]
  --extra-cflags=CFLAGS    append extra C compiler flags QEMU_CFLAGS
  --extra-ldflags=LDFLAGS  append extra linker flags LDFLAGS
  --make=MAKE              use specified make [$make]
  --install=INSTALL        use specified install [$install]
  --python=PYTHON          use specified python [$python]
  --smbd=SMBD              use specified smbd [$smbd]
  --static                 enable static build [$static]
  --mandir=PATH            install man pages in PATH
  --datadir=PATH           install firmware in PATH$confsuffix
  --docdir=PATH            install documentation in PATH$confsuffix
  --bindir=PATH            install binaries in PATH
  --libdir=PATH            install libraries in PATH
  --sysconfdir=PATH        install config in PATH$confsuffix
  --localstatedir=PATH     install local state in PATH (set at runtime on win32)
1261
  --with-confsuffix=SUFFIX suffix for QEMU data inside datadir/libdir/sysconfdir [$confsuffix]
1262
  --enable-modules         enable modules support
1263 1264
  --enable-debug-tcg       enable TCG debugging
  --disable-debug-tcg      disable TCG debugging (default)
1265 1266
  --enable-debug-info      enable debugging information (default)
  --disable-debug-info     disable debugging information
1267 1268 1269 1270 1271
  --enable-debug           enable common debug build options
  --enable-sparse          enable sparse checker
  --disable-sparse         disable sparse checker (default)
  --disable-strip          disable stripping binaries
  --disable-werror         disable compilation abort on warning
1272
  --disable-stack-protector disable compiler-provided stack protection
1273 1274
  --disable-sdl            disable SDL
  --enable-sdl             enable SDL
1275
  --with-sdlabi            select preferred SDL ABI 1.2 or 2.0
1276 1277
  --disable-gtk            disable gtk UI
  --enable-gtk             enable gtk UI
1278
  --with-gtkabi            select preferred GTK ABI 2.0 or 3.0
1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342