X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=configure;h=e31d6a7fee88900559fb2ccd1a94a784993d047d;hb=9c3a418eac5ccc3ad9f7111d858060e24a1dc051;hp=fd544e7b55f40150250acae518d7fcba8e6747d8;hpb=b11499117cbb7f8138e88186e6ac2fbf2a2df123;p=mirror_qemu.git diff --git a/configure b/configure index fd544e7b55..e31d6a7fee 100755 --- a/configure +++ b/configure @@ -265,6 +265,13 @@ libs_qga="" debug_info="yes" stack_protector="" +if test -e "$source_path/.git" +then + git_submodules="ui/keycodemapdb" +else + git_submodules="" +fi + # Don't accept a target_list environment variable. unset target_list @@ -290,12 +297,14 @@ netmap="no" sdl="" sdlabi="" virtfs="" +mpath="" vnc="yes" sparse="no" vde="" vnc_sasl="" vnc_jpeg="" vnc_png="" +xkbcommon="" xen="" xen_ctrl_version="" xen_pv_domain_build="no" @@ -331,6 +340,7 @@ modules="no" prefix="/usr/local" mandir="\${prefix}/share/man" datadir="\${prefix}/share" +firmwarepath="\${prefix}/share/qemu-firmware" qemu_docdir="\${prefix}/share/doc/qemu" bindir="\${prefix}/bin" libdir="\${prefix}/lib" @@ -365,6 +375,7 @@ opengl_dmabuf="no" cpuid_h="no" avx2_opt="no" zlib="yes" +capstone="" lzo="" snappy="" bzip2="" @@ -745,7 +756,6 @@ SunOS) solaris="yes" make="${MAKE-gmake}" install="${INSTALL-ginstall}" - ld="gld" smbd="${SMBD-/usr/sfw/sbin/smbd}" if test -f /usr/include/sys/soundcard.h ; then audio_drv_list="oss" @@ -818,7 +828,7 @@ if test "$mingw32" = "yes" ; then sysconfdir="\${prefix}" local_statedir= confsuffix="" - libs_qga="-lws2_32 -lwinmm -lpowrprof -lwtsapi32 -liphlpapi -lnetapi32 $libs_qga" + libs_qga="-lws2_32 -lwinmm -lpowrprof -lwtsapi32 -lwininet -liphlpapi -lnetapi32 $libs_qga" fi werror="" @@ -914,6 +924,8 @@ for opt do ;; --localstatedir=*) local_statedir="$optarg" ;; + --firmwarepath=*) firmwarepath="$optarg" + ;; --sbindir=*|--sharedstatedir=*|\ --oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\ --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*) @@ -936,6 +948,10 @@ for opt do ;; --enable-virtfs) virtfs="yes" ;; + --disable-mpath) mpath="no" + ;; + --enable-mpath) mpath="yes" + ;; --disable-vnc) vnc="no" ;; --enable-vnc) vnc="yes" @@ -1279,6 +1295,14 @@ for opt do error_exit "vhost-user isn't available on win32" fi ;; + --disable-capstone) capstone="no" + ;; + --enable-capstone) capstone="yes" + ;; + --enable-capstone=git) capstone="git" + ;; + --enable-capstone=system) capstone="system" + ;; *) echo "ERROR: unknown option $opt" echo "Try '$0 --help' for more information" @@ -1411,6 +1435,7 @@ Advanced options (experts only): --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) + --firmwarepath=PATH search PATH for firmware files --with-confsuffix=SUFFIX suffix for QEMU data inside datadir/libdir/sysconfdir [$confsuffix] --enable-debug enable common debug build options --disable-strip disable stripping binaries @@ -1479,6 +1504,7 @@ disabled with --disable-FEATURE, default is enabled if available: vnc-png PNG compression for VNC server cocoa Cocoa UI (Mac OS X only) virtfs VirtFS + mpath Multipath persistent reservation passthrough xen xen backend driver support xen-pci-passthrough brlapi BrlAPI (Braile) @@ -1524,6 +1550,7 @@ disabled with --disable-FEATURE, default is enabled if available: vxhs Veritas HyperScale vDisk backend support crypto-afalg Linux AF_ALG crypto backend driver vhost-user vhost-user support + capstone capstone disassembler support NOTE: The object files are built at the place where configure is launched EOF @@ -1642,6 +1669,19 @@ EOF fi fi +# Disable -Wmissing-braces on older compilers that warn even for +# the "universal" C zero initializer {0}. +cat > $TMPC << EOF +struct { + int a[2]; +} x = {0}; +EOF +if compile_object "-Werror" "" ; then + : +else + QEMU_CFLAGS="$QEMU_CFLAGS -Wno-missing-braces" +fi + # Workaround for http://gcc.gnu.org/PR55489. Happens with -fPIE/-fPIC and # large functions that use global variables. The bug is in all releases of # GCC, but it became particularly acute in 4.6.x and 4.7.x. It is fixed in @@ -2800,7 +2840,6 @@ EOF rdma_libs="-lrdmacm -libverbs" if compile_prog "" "$rdma_libs" ; then rdma="yes" - libs_softmmu="$libs_softmmu $rdma_libs" else if test "$rdma" = "yes" ; then error_exit \ @@ -2892,6 +2931,21 @@ EOF fi fi +########################################## +# xkbcommon probe +if test "$xkbcommon" != "no" ; then + if $pkg_config xkbcommon --exists; then + xkbcommon_cflags=$($pkg_config xkbcommon --cflags) + xkbcommon_libs=$($pkg_config xkbcommon --libs) + xkbcommon=yes + else + if test "$xkbcommon" = "yes" ; then + feature_not_found "xkbcommon" "Install libxkbcommon-devel" + fi + xkbcommon=no + fi +fi + ########################################## # fnmatch() probe, used for ACL routines fnmatch="no" @@ -3086,7 +3140,6 @@ int main( void ) { return brlapi__openConnection (NULL, NULL, NULL); } EOF if compile_prog "" "$brlapi_libs" ; then brlapi=yes - libs_softmmu="$brlapi_libs $libs_softmmu" else if test "$brlapi" = "yes" ; then feature_not_found "brlapi" "Install brlapi devel" @@ -3296,6 +3349,38 @@ else "Please install the pixman devel package." fi +########################################## +# libmpathpersist probe + +if test "$mpath" != "no" ; then + cat > $TMPC < +#include +unsigned mpath_mx_alloc_len = 1024; +int logsink; +static struct config *multipath_conf; +extern struct udev *udev; +extern struct config *get_multipath_config(void); +extern void put_multipath_config(struct config *conf); +struct udev *udev; +struct config *get_multipath_config(void) { return multipath_conf; } +void put_multipath_config(struct config *conf) { } + +int main(void) { + udev = udev_new(); + multipath_conf = mpath_lib_init(); + return 0; +} +EOF + if compile_prog "" "-ludev -lmultipath -lmpathpersist" ; then + mpathpersist=yes + else + mpathpersist=no + fi +else + mpathpersist=no +fi + ########################################## # libcap probe @@ -3464,6 +3549,12 @@ else tpm_passthrough=no fi +# TPM emulator is for all posix systems +if test "$mingw32" != "yes"; then + tpm_emulator=$tpm +else + tpm_emulator=no +fi ########################################## # attr probe @@ -3553,27 +3644,30 @@ EOF if compile_prog "" "$fdt_libs" ; then # system DTC is good - use it fdt=yes - elif test -d ${source_path}/dtc/libfdt ; then - # have submodule DTC - use it - fdt=yes - dtc_internal="yes" - mkdir -p dtc - if [ "$pwd_is_source_path" != "y" ] ; then - symlink "$source_path/dtc/Makefile" "dtc/Makefile" - symlink "$source_path/dtc/scripts" "dtc/scripts" - fi - fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt" - fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs" - elif test "$fdt" = "yes" ; then - # have neither and want - prompt for system/submodule install - error_exit "DTC (libfdt) version >= 1.4.2 not present. Your options:" \ - " (1) Preferred: Install the DTC (libfdt) devel package" \ - " (2) Fetch the DTC submodule, using:" \ - " git submodule update --init dtc" else - # don't have and don't want - fdt_libs= - fdt=no + # have GIT checkout, so activate dtc submodule + if test -e "${source_path}/.git" ; then + git_submodules="${git_submodules} dtc" + fi + if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then + fdt=yes + dtc_internal="yes" + mkdir -p dtc + if [ "$pwd_is_source_path" != "y" ] ; then + symlink "$source_path/dtc/Makefile" "dtc/Makefile" + symlink "$source_path/dtc/scripts" "dtc/scripts" + fi + fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt" + fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs" + elif test "$fdt" = "yes" ; then + # Not a git build & no libfdt found, prompt for system install + error_exit "DTC (libfdt) version >= 1.4.2 not present." \ + "Please install the DTC (libfdt) devel package" + else + # don't have and don't want + fdt_libs= + fdt=no + fi fi fi @@ -4201,13 +4295,10 @@ EOF fi # check for smartcard support -smartcard_cflags="" if test "$smartcard" != "no"; then if $pkg_config libcacard; then libcacard_cflags=$($pkg_config --cflags libcacard) libcacard_libs=$($pkg_config --libs libcacard) - QEMU_CFLAGS="$QEMU_CFLAGS $libcacard_cflags" - libs_softmmu="$libs_softmmu $libcacard_libs" smartcard="yes" else if test "$smartcard" = "yes"; then @@ -4223,8 +4314,6 @@ if test "$libusb" != "no" ; then libusb="yes" libusb_cflags=$($pkg_config --cflags libusb-1.0) libusb_libs=$($pkg_config --libs libusb-1.0) - QEMU_CFLAGS="$QEMU_CFLAGS $libusb_cflags" - libs_softmmu="$libs_softmmu $libusb_libs" else if test "$libusb" = "yes"; then feature_not_found "libusb" "Install libusb devel >= 1.0.13" @@ -4239,8 +4328,6 @@ if test "$usb_redir" != "no" ; then usb_redir="yes" usb_redir_cflags=$($pkg_config --cflags libusbredirparser-0.5) usb_redir_libs=$($pkg_config --libs libusbredirparser-0.5) - QEMU_CFLAGS="$QEMU_CFLAGS $usb_redir_cflags" - libs_softmmu="$libs_softmmu $usb_redir_libs" else if test "$usb_redir" = "yes"; then feature_not_found "usb-redir" "Install usbredir devel" @@ -4346,6 +4433,58 @@ EOF fi fi +########################################## +# capstone + +case "$capstone" in + "" | yes) + if $pkg_config capstone; then + capstone=system + elif test -e "${source_path}/.git" ; then + capstone=git + elif test -e "${source_path}/capstone/Makefile" ; then + capstone=internal + elif test -z "$capstone" ; then + capstone=no + else + feature_not_found "capstone" "Install capstone devel or git submodule" + fi + ;; + + system) + if ! $pkg_config capstone; then + feature_not_found "capstone" "Install capstone devel" + fi + ;; +esac + +case "$capstone" in + git | internal) + if test "$capstone" = git; then + git_submodules="${git_submodules} capstone" + fi + mkdir -p capstone + QEMU_CFLAGS="$QEMU_CFLAGS -I\$(SRC_PATH)/capstone/include" + if test "$mingw32" = "yes"; then + LIBCAPSTONE=capstone.lib + else + LIBCAPSTONE=libcapstone.a + fi + LIBS="-L\$(BUILD_DIR)/capstone -lcapstone $LIBS" + ;; + + system) + QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags capstone)" + LIBS="$($pkg_config --libs capstone) $LIBS" + ;; + + no) + ;; + *) + error_exit "Unknown state for capstone: $capstone" + ;; +esac + ########################################## # check if we have fdatasync @@ -4403,6 +4542,18 @@ if compile_prog "" "" ; then posix_syslog=yes fi +########################################## +# check if we have sem_timedwait + +sem_timedwait=no +cat > $TMPC << EOF +#include +int main(void) { return sem_timedwait(0, 0); } +EOF +if compile_prog "" "" ; then + sem_timedwait=yes +fi + ########################################## # check if trace backend exists @@ -5031,16 +5182,37 @@ if test "$want_tools" = "yes" ; then fi fi if test "$softmmu" = yes ; then - if test "$virtfs" != no ; then - if test "$cap" = yes && test "$linux" = yes && test "$attr" = yes ; then + if test "$linux" = yes; then + if test "$virtfs" != no && test "$cap" = yes && test "$attr" = yes ; then virtfs=yes tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)" else if test "$virtfs" = yes; then - error_exit "VirtFS is supported only on Linux and requires libcap devel and libattr devel" + error_exit "VirtFS requires libcap devel and libattr devel" fi virtfs=no fi + if test "$mpath" != no && test "$mpathpersist" = yes ; then + mpath=yes + else + if test "$mpath" = yes; then + error_exit "Multipath requires libmpathpersist devel" + fi + mpath=no + fi + tools="$tools scsi/qemu-pr-helper\$(EXESUF)" + else + if test "$virtfs" = yes; then + error_exit "VirtFS is supported only on Linux" + fi + virtfs=no + if test "$mpath" = yes; then + error_exit "Multipath is supported only on Linux" + fi + mpath=no + fi + if test "$xkbcommon" = "yes"; then + tools="qemu-keymap\$(EXESUF) $tools" fi fi @@ -5225,6 +5397,7 @@ libs_softmmu="$pixman_libs $libs_softmmu" echo "Install prefix $prefix" echo "BIOS directory $(eval echo $qemu_datadir)" +echo "firmware path $(eval echo $firmwarepath)" echo "binary directory $(eval echo $bindir)" echo "library directory $(eval echo $libdir)" echo "module directory $(eval echo $qemu_moddir)" @@ -5240,6 +5413,7 @@ echo "local state directory queried at runtime" echo "Windows SDK $win_sdk" fi echo "Source path $source_path" +echo "GIT submodules $git_submodules" echo "C compiler $cc" echo "Host C compiler $host_cc" echo "C++ compiler $cxx" @@ -5286,6 +5460,7 @@ echo "Audio drivers $audio_drv_list" echo "Block whitelist (rw) $block_drv_rw_whitelist" echo "Block whitelist (ro) $block_drv_ro_whitelist" echo "VirtFS support $virtfs" +echo "Multipath support $mpath" echo "VNC support $vnc" if test "$vnc" = "yes" ; then echo "VNC SASL support $vnc_sasl" @@ -5356,6 +5531,7 @@ echo "gcov enabled $gcov" echo "TPM support $tpm" echo "libssh2 support $libssh2" echo "TPM passthrough $tpm_passthrough" +echo "TPM emulator $tpm_emulator" echo "QOM debugging $qom_cast_debug" echo "Live block migration $live_block_migration" echo "lzo support $lzo" @@ -5367,6 +5543,7 @@ echo "jemalloc support $jemalloc" echo "avx2 optimization $avx2_opt" echo "replication support $replication" echo "VxHS block device $vxhs" +echo "capstone $capstone" if test "$sdl_too_old" = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -5415,6 +5592,7 @@ echo "mandir=$mandir" >> $config_host_mak echo "sysconfdir=$sysconfdir" >> $config_host_mak echo "qemu_confdir=$qemu_confdir" >> $config_host_mak echo "qemu_datadir=$qemu_datadir" >> $config_host_mak +echo "qemu_firmwarepath=$firmwarepath" >> $config_host_mak echo "qemu_docdir=$qemu_docdir" >> $config_host_mak echo "qemu_moddir=$qemu_moddir" >> $config_host_mak if test "$mingw32" = "no" ; then @@ -5426,6 +5604,7 @@ echo "extra_cxxflags=$EXTRA_CXXFLAGS" >> $config_host_mak echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak echo "qemu_localedir=$qemu_localedir" >> $config_host_mak echo "libs_softmmu=$libs_softmmu" >> $config_host_mak +echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak echo "ARCH=$ARCH" >> $config_host_mak @@ -5537,6 +5716,10 @@ fi if test "$vnc_png" = "yes" ; then echo "CONFIG_VNC_PNG=y" >> $config_host_mak fi +if test "$xkbcommon" = "yes" ; then + echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak + echo "XKBCOMMON_LIBS=$xkbcommon_libs" >> $config_host_mak +fi if test "$fnmatch" = "yes" ; then echo "CONFIG_FNMATCH=y" >> $config_host_mak fi @@ -5638,6 +5821,9 @@ fi if test "$inotify1" = "yes" ; then echo "CONFIG_INOTIFY1=y" >> $config_host_mak fi +if test "$sem_timedwait" = "yes" ; then + echo "CONFIG_SEM_TIMEDWAIT=y" >> $config_host_mak +fi if test "$byteswap_h" = "yes" ; then echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak fi @@ -5651,6 +5837,7 @@ if test "$curl" = "yes" ; then fi if test "$brlapi" = "yes" ; then echo "CONFIG_BRLAPI=y" >> $config_host_mak + echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak fi if test "$bluez" = "yes" ; then echo "CONFIG_BLUEZ=y" >> $config_host_mak @@ -5736,6 +5923,9 @@ fi if test "$virtfs" = "yes" ; then echo "CONFIG_VIRTFS=y" >> $config_host_mak fi +if test "$mpath" = "yes" ; then + echo "CONFIG_MPATH=y" >> $config_host_mak +fi if test "$vhost_scsi" = "yes" ; then echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak fi @@ -5785,14 +5975,20 @@ fi if test "$smartcard" = "yes" ; then echo "CONFIG_SMARTCARD=y" >> $config_host_mak + echo "SMARTCARD_CFLAGS=$libcacard_cflags" >> $config_host_mak + echo "SMARTCARD_LIBS=$libcacard_libs" >> $config_host_mak fi if test "$libusb" = "yes" ; then echo "CONFIG_USB_LIBUSB=y" >> $config_host_mak + echo "LIBUSB_CFLAGS=$libusb_cflags" >> $config_host_mak + echo "LIBUSB_LIBS=$libusb_libs" >> $config_host_mak fi if test "$usb_redir" = "yes" ; then echo "CONFIG_USB_REDIR=y" >> $config_host_mak + echo "USB_REDIR_CFLAGS=$usb_redir_cflags" >> $config_host_mak + echo "USB_REDIR_LIBS=$usb_redir_libs" >> $config_host_mak fi if test "$opengl" = "yes" ; then @@ -5941,12 +6137,16 @@ if test "$live_block_migration" = "yes" ; then echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak fi -# TPM passthrough support? if test "$tpm" = "yes"; then echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak + # TPM passthrough support? if test "$tpm_passthrough" = "yes"; then echo "CONFIG_TPM_PASSTHROUGH=y" >> $config_host_mak fi + # TPM emulator support? + if test "$tpm_emulator" = "yes"; then + echo "CONFIG_TPM_EMULATOR=y" >> $config_host_mak + fi fi echo "TRACE_BACKENDS=$trace_backends" >> $config_host_mak @@ -5988,6 +6188,7 @@ echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak if test "$rdma" = "yes" ; then echo "CONFIG_RDMA=y" >> $config_host_mak + echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak fi if test "$have_rtnetlink" = "yes" ; then @@ -6017,6 +6218,9 @@ fi if test "$ivshmem" = "yes" ; then echo "CONFIG_IVSHMEM=y" >> $config_host_mak fi +if test "$capstone" != "no" ; then + echo "CONFIG_CAPSTONE=y" >> $config_host_mak +fi # Hold two types of flag: # CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name on @@ -6499,6 +6703,12 @@ done # for target in $targets if [ "$dtc_internal" = "yes" ]; then echo "config-host.h: subdir-dtc" >> $config_host_mak fi +if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then + echo "config-host.h: subdir-capstone" >> $config_host_mak +fi +if test -n "$LIBCAPSTONE"; then + echo "LIBCAPSTONE=$LIBCAPSTONE" >> $config_host_mak +fi if test "$numa" = "yes"; then echo "CONFIG_NUMA=y" >> $config_host_mak @@ -6509,8 +6719,8 @@ if test "$ccache_cpp2" = "yes"; then fi # build tree in object directory in case the source is not in the current directory -DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests" -DIRS="$DIRS docs docs/interop fsdev" +DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests tests/vm" +DIRS="$DIRS docs docs/interop fsdev scsi" DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw" DIRS="$DIRS roms/seabios roms/vgabios" DIRS="$DIRS qapi-generated"