X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure;h=20925efd72cfc31912c09d62f78b64ab82794cca;hb=f46a7f0048400251a9fed9bf8f99b179ff81993a;hp=5eaa802a807fb1781f3c791aef559bec7435b4cd;hpb=0acf0a50c8ae6a4e146e00df5dba9f763d7b75a6;p=sdk%2Femulator%2Fqemu.git diff --git a/configure b/configure index 5eaa802..20925ef 100755 --- a/configure +++ b/configure @@ -198,6 +198,7 @@ audio_win_int="" cc_i386=i386-pc-linux-gnu-gcc libs_qga="" debug_info="yes" +stack_protector="" # Don't accept a target_list environment variable. unset target_list @@ -246,6 +247,7 @@ xfs="" vhost_net="no" vhost_scsi="no" kvm="no" +hax="no" rdma="" gprof="no" debug_tcg="no" @@ -298,7 +300,12 @@ rbd="" smartcard_nss="" libusb="" usb_redir="" +opengl="" +efence="no" +yagl="no" +yagl_stats="no" glx="" +vigs="no" zlib="yes" lzo="no" snappy="no" @@ -312,6 +319,13 @@ libnfs="" coroutine="" coroutine_pool="" seccomp="" + +# for TIZEN-maru +maru="no" +shm="no" +libav="no" +libpng="no" +# glusterfs="" glusterfs_discard="no" glusterfs_zerofill="no" @@ -645,6 +659,10 @@ Haiku) if [ "$cpu" = "i386" -o "$cpu" = "x86_64" -o "$cpu" = "x32" ] ; then audio_possible_drivers="$audio_possible_drivers fmod" fi + +# fix linking error on Ubuntu 13.04 +# libs_qga="-lrt $libs_qga" +# QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers $QEMU_INCLUDES" QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers $QEMU_INCLUDES" ;; esac @@ -890,6 +908,10 @@ for opt do ;; --enable-kvm) kvm="yes" ;; + --disable-hax) hax="no" + ;; + --enable-hax) hax="yes" + ;; --disable-tcg-interpreter) tcg_interpreter="no" ;; --enable-tcg-interpreter) tcg_interpreter="yes" @@ -946,10 +968,16 @@ for opt do ;; --enable-uname-release=*) uname_release="$optarg" ;; - --enable-werror) werror="yes" + --enable-werror) + werror="yes" ; + force_werror="yes" ; ;; --disable-werror) werror="no" ;; + --enable-stack-protector) stack_protector="yes" + ;; + --disable-stack-protector) stack_protector="no" + ;; --disable-curses) curses="no" ;; --enable-curses) curses="yes" @@ -988,6 +1016,26 @@ for opt do ;; --enable-vhost-net) vhost_net="yes" ;; + --enable-efence) efence="yes" + ;; + --disable-efence) efence="no" + ;; + --enable-yagl) yagl="yes" + ;; + --disable-yagl) yagl="no" + ;; + --enable-yagl-stats) yagl_stats="yes" + ;; + --disable-yagl-stats) yagl_stats="no" + ;; + --enable-opengl) opengl="yes" + ;; + --enable-vigs) vigs="yes" + ;; + --disable-vigs) vigs="no" + ;; + --disable-opengl) opengl="no" + ;; --disable-vhost-scsi) vhost_scsi="no" ;; --enable-vhost-scsi) vhost_scsi="yes" @@ -1046,6 +1094,18 @@ for opt do ;; --disable-seccomp) seccomp="no" ;; +# for TIZEN-maru + --enable-maru) maru="yes" + ;; + --enable-shm) shm="yes" + ;; + --enable-libav) libav="yes" + ;; + --disable-libav) libav="no" + ;; + --enable-libpng) libpng="yes" + ;; +# --disable-glusterfs) glusterfs="no" ;; --enable-glusterfs) glusterfs="yes" @@ -1219,6 +1279,7 @@ Advanced options (experts only): --disable-sparse disable sparse checker (default) --disable-strip disable stripping binaries --disable-werror disable compilation abort on warning + --disable-stack-protector disable compiler-provided stack protection --disable-sdl disable SDL --enable-sdl enable SDL --with-sdlabi select preferred SDL ABI 1.2 or 2.0 @@ -1345,6 +1406,22 @@ Advanced options (experts only): --disable-quorum disable quorum block filter support --enable-quorum enable quorum block filter support + --disable-hax disable HAX acceleration support + --enable-hax enable HAX acceleration support + --enable-yagl enable YaGL device + --disable-yagl disable YaGL device + --enable-yagl-stats enable YaGL stats + --disable-yagl-stats disable YaGL stats + --enable-vigs enable VIGS device + --disable-vigs disable VIGS device + +TIZEN-maru options: + --enable-maru enable maru board + --enable-shm enable shared memory for framebuffer + --enable-libav enable libav library + --disable-libav disable libav library + --enable-libpng enable png library + NOTE: The object files are built at the place where configure is launched EOF exit 1 @@ -1439,9 +1516,18 @@ for flag in $gcc_flags; do fi done -if compile_prog "-Werror -fstack-protector-all" "" ; then - QEMU_CFLAGS="$QEMU_CFLAGS -fstack-protector-all" - LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,-fstack-protector-all" +if test "$stack_protector" != "no" ; then + gcc_flags="-fstack-protector-strong -fstack-protector-all" + for flag in $gcc_flags; do + # We need to check both a compile and a link, since some compiler + # setups fail only on a .c->.o compile and some only at link time + if do_cc $QEMU_CFLAGS -Werror $flag -c -o $TMPO $TMPC && + compile_prog "-Werror $flag" ""; then + QEMU_CFLAGS="$QEMU_CFLAGS $flag" + LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,$flag" + break + fi + done fi # Workaround for http://gcc.gnu.org/PR55489. Happens with -fPIE/-fPIC and @@ -2712,6 +2798,24 @@ if test "$mingw32" != yes -a "$pthread" = no; then "Make sure to have the pthread libs and headers installed." fi +# check for pthread_setname_np +pthread_setname_np=no +cat > $TMPC << EOF +#include + +static void *f(void *p) { return NULL; } +int main(void) +{ + pthread_t thread; + pthread_create(&thread, 0, f, 0); + pthread_setname_np(thread, "QEMU"); + return 0; +} +EOF +if compile_prog "" "$pthread_lib" ; then + pthread_setname_np=yes +fi + ########################################## # rbd probe if test "$rbd" != "no" ; then @@ -3772,10 +3876,12 @@ int main(void) { return 0; } EOF -if compile_prog "-Werror" "" ; then +if test "$force_werror" != "yes"; then + if compile_prog "-Werror" "" ; then pragma_diagnostic_available=yes -else + else werror=no + fi fi ######################################## @@ -3871,6 +3977,85 @@ if compile_prog "" "" ; then fi ########################################## +# libav probe + +if test "$libav" != "no"; then + libavcodec_package="libavcodec" + libavcodec_version="54.35.0" + libavutil_package="libavutil" + libavutil_version="52.3.0" + libavformat_package="libavformat" + libavformat_version="54.20.3" + libavresample_package="libavresample" + libavresample_version="1.0.1" + + if $pkg_config --exists "$libavcodec_package >= $libavcodec_version" ; then + libav_cflags=`$pkg_config --cflags $libavcodec_package` + libav_libs=`$pkg_config --libs $libavcodec_package` + libs_softmmu="$libav_libs $libs_softmmu" + libav="yes" + else + #if test "$libav" = "yes" ; then + # feature_not_found "libav" + #fi + libav="no" + fi + + if $pkg_config --exists "$libavutil_package >= $libavutil_version" ; then + libav_libs=`$pkg_config --libs-only-l $libavutil_package` + libs_softmmu="$libav_libs $libs_softmmu" + libav="yes" + else + #if test "$libav" = "yes" ; then + # feature_not_found "libav" + #fi + libav="no" + fi + + if $pkg_config --exists "$libavformat_package >= $libavformat_version" ; then + libav_libs=`$pkg_config --libs-only-l $libavformat_package` + libs_softmmu="$libav_libs $libs_softmmu" + libav="yes" + else + #if test "$libav" = "yes" ; then + # feature_not_found "libav" + #fi + libav="no" + fi + + if $pkg_config --exists "$libavresample_package >= $libavresample_version" ; then + libav_libs=`$pkg_config --libs-only-l $libavresample_package` + libs_softmmu="$libav_libs $libs_softmmu" + libav="yes" + else + #if test "$libav" = "yes" ; then + # feature_not_found "libav" + #fi + libav="no" + fi + +fi + +########################################## +# libpng probe + +if test "$libpng" != "no"; then + libpng_package="libpng" + + if $pkg_config --exists "$libpng_package" ; then + libpng_cflags=`$pkg_config --cflags $libpng_package` + libpng_libs=`$pkg_config --libs $libpng_package` + libs_softmmu="$libpng_libs $libs_softmmu" + libpng="yes" + else + if test "$libpng" = "yes" ; then + feature_not_found "libpng" + fi + libpng="no" + fi +fi + +########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -3950,6 +4135,12 @@ if test "$softmmu" = yes ; then if test "$cap" = yes && test "$linux" = yes && test "$attr" = yes ; then virtfs=yes tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)" + elif test "$darwin" = yes ; then + echo "Enable VirtFS on Darwin" + virtfs=yes + elif test "$mingw32" = yes ; then + echo "Enable VirtFS on Windows" + virtfs=yes else if test "$virtfs" = yes; then error_exit "VirtFS is supported only on Linux and requires libcap-devel and libattr-devel" @@ -4126,6 +4317,7 @@ echo "xfsctl support $xfs" echo "nss used $smartcard_nss" echo "libusb $libusb" echo "usb net redir $usb_redir" +echo "EFence support $efence" echo "GLX support $glx" if test "$libiscsi_version" = "1.4.0"; then echo "libiscsi support $libiscsi (1.4.0)" @@ -4151,6 +4343,19 @@ echo "Quorum $quorum" echo "lzo support $lzo" echo "snappy support $snappy" +echo "HAX support $hax" +echo "YaGL support $yagl" +echo "YaGL stats $yagl_stats" +echo "OpenGL support $opengl" +echo "VIGS support $vigs" + +# for TIZEN-maru +echo "TIZEN-maru support $maru" +echo "TIZEN-maru shared framebuffer support $shm" +echo "TIZEN-maru libav support $libav" +echo "TIZEN-maru libpng support $libpng" +# + if test "$sdl_too_old" = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" fi @@ -4457,6 +4662,36 @@ if test "$spice" = "yes" ; then echo "CONFIG_SPICE=y" >> $config_host_mak fi +if test "$efence" = "yes" ; then + echo "CONFIG_EFENCE=y" >> $config_host_mak +fi + +if test "$yagl" = "yes" ; then + echo "CONFIG_YAGL=y" >> $config_host_mak + if test "$linux" = "yes" ; then + LIBS="-lGLU -ldl $LIBS" + elif test "$mingw32" = "yes" ; then + LIBS="-lopengl32 -lglu32 $LIBS" + elif test "$darwin" = "yes" ; then + LIBS="-framework OpenGL -framework AGL -framework GLUT $LIBS" + else + echo "ERROR: YaGL is not available on $targetos" + exit 1 + fi +fi + +if test "$yagl_stats" = "yes" ; then + echo "CONFIG_YAGL_STATS=y" >> $config_host_mak +fi + +if test "$vigs" = "yes" ; then + echo "CONFIG_VIGS=y" >> $config_host_mak +fi + +if test "$smartcard" = "yes" ; then + echo "CONFIG_SMARTCARD=y" >> $config_host_mak +fi + if test "$smartcard_nss" = "yes" ; then echo "CONFIG_SMARTCARD_NSS=y" >> $config_host_mak echo "libcacard_libs=$libcacard_libs" >> $config_host_mak @@ -4598,6 +4833,22 @@ else echo "HOST_USB=stub" >> $config_host_mak fi +# for TIZEN-maru +if test "$maru" = "yes" ; then + echo "CONFIG_MARU=y" >> $config_host_mak +fi +if test "$shm" = "yes" ; then + echo "CONFIG_USE_SHM=y" >> $config_host_mak +fi +if test "$libav" = "yes" ; then + echo "CONFIG_LIBAV=y" >> $config_host_mak + echo "LIBAV_CFLAGS=$libav_cflags" >> $config_host_mak +fi +if test "$libpng" = "yes" ; then + echo "CONFIG_PNG=y" >> $config_host_mak + echo "LIBPNG_CFLAGS=$libpng_cflags" >> $config_host_mak +fi + # TPM passthrough support? if test "$tpm" = "yes"; then echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak @@ -4648,6 +4899,16 @@ if test "$rdma" = "yes" ; then echo "CONFIG_RDMA=y" >> $config_host_mak fi +# Hold two types of flag: +# CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name on +# a thread we have a handle to +# CONFIG_PTHREAD_SETNAME_NP - A way of doing it on a particular +# platform +if test "$pthread_setname_np" = "yes" ; then + echo "CONFIG_THREAD_SETNAME_BYTHREAD=y" >> $config_host_mak + echo "CONFIG_PTHREAD_SETNAME_NP=y" >> $config_host_mak +fi + if test "$tcg_interpreter" = "yes"; then QEMU_INCLUDES="-I\$(SRC_PATH)/tcg/tci $QEMU_INCLUDES" elif test "$ARCH" = "sparc64" ; then @@ -4942,6 +5203,24 @@ case "$target_name" in fi fi esac +case "$target_name" in + i386|x86_64) + echo "CONFIG_HAVE_GET_MEMORY_MAPPING=y" >> $config_target_mak +esac +if test "$hax" = "yes" ; then + if test "$target_softmmu" = "yes" ; then + case "$target_name" in + i386|x86_64) + echo "CONFIG_HAX=y" >> $config_target_mak + ;; + *) + echo "CONFIG_NO_HAX=y" >> $config_target_mak + ;; + esac + else + echo "CONFIG_NO_HAX=y" >> $config_target_mak + fi +fi if test "$target_bigendian" = "yes" ; then echo "TARGET_WORDS_BIGENDIAN=y" >> $config_target_mak fi @@ -4978,6 +5257,42 @@ fi cflags="" ldflags="" +if test "$tcg_interpreter" = "yes"; then + includes="-I\$(SRC_PATH)/tcg/tci $includes" +elif test "$ARCH" = "sparc64" ; then + includes="-I\$(SRC_PATH)/tcg/sparc $includes" +elif test "$ARCH" = "s390x" ; then + includes="-I\$(SRC_PATH)/tcg/s390 $includes" +elif test "$ARCH" = "x86_64" ; then + includes="-I\$(SRC_PATH)/tcg/i386 $includes" +else + includes="-I\$(SRC_PATH)/tcg/\$(ARCH) $includes" +fi +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 + libdis_config_mak=libdis-user/config.mak +else + libdis_config_mak=libdis/config.mak +fi + +if test "$efence" = "yes" ; then + echo "CONFIG_BUILD_WITH_EFENCE=y" >> $config_target_mak + echo "LIBS+=-lefence" >> $config_target_mak +fi + +if test "$yagl" = "yes" ; then + echo "CONFIG_BUILD_YAGL=y" >> $config_target_mak +fi + +if test "$vigs" = "yes" ; then + echo "CONFIG_BUILD_VIGS=y" >> $config_target_mak +fi + for i in $ARCH $TARGET_BASE_ARCH ; do case "$i" in alpha) @@ -5072,6 +5387,20 @@ alpha) ;; esac +if test "$target_softmmu" = "yes" ; then + case "$TARGET_BASE_ARCH" in + arm) + cflags="-DHAS_AUDIO -DHAS_AUDIO_CHOICE $cflags" + ;; + lm32) + cflags="-DHAS_AUDIO $cflags" + ;; + i386|mips|ppc) + cflags="-DHAS_AUDIO -DHAS_AUDIO_CHOICE $cflags" + ;; + esac +fi + if test "$gprof" = "yes" ; then echo "TARGET_GPROF=yes" >> $config_target_mak if test "$target_linux_user" = "yes" ; then