Merge branch 'upstream-1.7' into tizen_qemu_1.7
[sdk/emulator/qemu.git] / configure
index 0666228..bb41d08 100755 (executable)
--- a/configure
+++ b/configure
@@ -193,6 +193,7 @@ xfs=""
 vhost_net="no"
 vhost_scsi="no"
 kvm="no"
+hax="no"
 rdma=""
 gprof="no"
 debug_tcg="no"
@@ -242,7 +243,12 @@ rbd=""
 smartcard_nss=""
 libusb=""
 usb_redir=""
+opengl=""
+efence="no"
+yagl="no"
+yagl_stats="no"
 glx=""
+vigs="no"
 zlib="yes"
 guest_agent=""
 guest_agent_with_vss="no"
@@ -253,6 +259,12 @@ libiscsi=""
 coroutine=""
 coroutine_pool=""
 seccomp=""
+gl="yes"
+
+# for TIZEN-maru 
+maru="no"
+shm="no"
+#
 glusterfs=""
 glusterfs_discard="no"
 virtio_blk_data_plane=""
@@ -582,6 +594,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
@@ -817,6 +833,14 @@ for opt do
   ;;
   --enable-kvm) kvm="yes"
   ;;
+  --disable-gl) gl="no"
+  ;;
+  --enable-gl) gl="yes"
+  ;;
+  --disable-hax) hax="no"
+  ;;
+  --enable-hax) hax="yes"
+  ;;
   --disable-tcg-interpreter) tcg_interpreter="no"
   ;;
   --enable-tcg-interpreter) tcg_interpreter="yes"
@@ -911,6 +935,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"
@@ -965,6 +1009,12 @@ for opt do
   ;;
   --disable-seccomp) seccomp="no"
   ;;
+# for TIZEN-maru
+  --enable-maru) maru="yes"
+  ;;
+  --enable-shm) shm="yes"
+  ;;
+#
   --disable-glusterfs) glusterfs="no"
   ;;
   --enable-glusterfs) glusterfs="yes"
@@ -1157,6 +1207,12 @@ echo "  --enable-bluez           enable bluez stack connectivity"
 echo "  --disable-slirp          disable SLIRP userspace network connectivity"
 echo "  --disable-kvm            disable KVM acceleration support"
 echo "  --enable-kvm             enable KVM acceleration support"
+
+echo "  --disable-hax            disable HAX acceleration support"
+echo "  --enable-hax             enable HAX acceleration support"
+
+echo "  --disable-gl             disable GL acceleration support"
+echo "  --enable-gl              enable GL acceleration support"
 echo "  --disable-rdma           disable RDMA-based migration support"
 echo "  --enable-rdma            enable RDMA-based migration support"
 echo "  --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)"
@@ -1202,6 +1258,16 @@ echo "  --enable-spice           enable spice"
 echo "  --enable-rbd             enable building the rados block device (rbd)"
 echo "  --disable-libiscsi       disable iscsi support"
 echo "  --enable-libiscsi        enable iscsi support"
+echo "  --enable-efence          enable Electic Fence"
+echo "  --disable-efence         disable Electic Fence"
+echo "  --enable-yagl            enable YaGL device"
+echo "  --disable-yagl           disable YaGL device"
+echo "  --enable-yagl-stats      enable YaGL stats"
+echo "  --disable-yagl-stats     disable YaGL stats"
+echo "  --enable-vigs            enable VIGS device"
+echo "  --disable-vigs           disable VIGS device"
+echo "  --disable-smartcard      disable smartcard support"
+echo "  --enable-smartcard       enable smartcard support"
 echo "  --disable-smartcard-nss  disable smartcard nss support"
 echo "  --enable-smartcard-nss   enable smartcard nss support"
 echo "  --disable-libusb         disable libusb (for usb passthrough)"
@@ -1228,6 +1294,10 @@ echo "  --enable-libssh2         enable ssh block device support"
 echo "  --disable-vhdx           disables support for the Microsoft VHDX image format"
 echo "  --enable-vhdx            enable support for the Microsoft VHDX image format"
 echo ""
+# for TIZEN-maru
+echo "TIZEN-maru options:"
+echo "  --enable-maru            enable maru board"
+echo "  --enable-shm             enable shared memory for framebuffer"
 echo "NOTE: The object files are built at the place where configure is launched"
 exit 1
 fi
@@ -3755,6 +3825,8 @@ echo "Linux AIO support $linux_aio"
 echo "ATTR/XATTR support $attr"
 echo "Install blobs     $blobs"
 echo "KVM support       $kvm"
+echo "HAX support       $hax"
+echo "GL support        $gl"
 echo "RDMA support      $rdma"
 echo "TCG interpreter   $tcg_interpreter"
 echo "fdt support       $fdt"
@@ -3775,7 +3847,12 @@ echo "xfsctl support    $xfs"
 echo "nss used          $smartcard_nss"
 echo "libusb            $libusb"
 echo "usb net redir     $usb_redir"
+echo "OpenGL support    $opengl"
+echo "EFence support    $efence"
+echo "YaGL support      $yagl"
+echo "YaGL stats        $yagl_stats"
 echo "GLX support       $glx"
+echo "VIGS support      $vigs"
 echo "libiscsi support  $libiscsi"
 echo "build guest agent $guest_agent"
 echo "QGA VSS support   $guest_agent_with_vss"
@@ -3792,6 +3869,11 @@ echo "TPM passthrough   $tpm_passthrough"
 echo "QOM debugging     $qom_cast_debug"
 echo "vhdx              $vhdx"
 
+# for TIZEN-maru
+echo "TIZEN-maru support $maru"
+echo "TIZEN-maru shared framebuffer support $shm"
+#
+
 if test "$sdl_too_old" = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
 fi
@@ -4084,6 +4166,35 @@ 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
+    echo -n;
+  elif test "$mingw32" = "yes" ; then
+    echo -n;
+  elif test "$darwin" = "yes" ; then
+    echo -n;  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
@@ -4194,6 +4305,16 @@ 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 "$gl" = "yes" ; then
+  echo "CONFIG_GL_BACKEND=y" >> $config_host_mak
+fi
 # TPM passthrough support?
 if test "$tpm" = "yes"; then
   echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak
@@ -4239,6 +4360,15 @@ echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak
 if test "$trace_default" = "yes"; then
   echo "CONFIG_TRACE_DEFAULT=y" >> $config_host_mak
 fi
+if test "$hax" = "yes" ; then
+  if test "$mingw32" = "yes" ; then
+    echo "CONFIG_HAX_BACKEND=y" >> $config_host_mak
+  elif test "$darwin" = "yes" ; then
+    echo "CONFIG_HAX_BACKEND=y" >> $config_host_mak
+  else
+    hax="no"
+  fi
+fi
 
 if test "$rdma" = "yes" ; then
   echo "CONFIG_RDMA=y" >> $config_host_mak
@@ -4534,6 +4664,41 @@ 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 "$gl" = "yes" ; then
+  case "$target_name" in
+  i386|x86_64|arm)
+    echo "CONFIG_GL=y" >> $config_target_mak
+    if test "$mingw32" = "yes" ; then
+      echo "LIBS+=-lopengl32 -lglu32" >> $config_target_mak
+    elif test "$darwin" = "yes" ; then
+      echo "LIBS+=-framework OpenGL -framework AGL " >> $config_target_mak
+    else
+      echo "LIBS+=-lGLU -ldl" >> $config_target_mak
+    fi
+  ;;
+  *)
+    echo "CONFIG_NO_GL=y" >> $config_target_mak
+  ;;
+  esac
+fi
 if test "$target_bigendian" = "yes" ; then
   echo "TARGET_WORDS_BIGENDIAN=y" >> $config_target_mak
 fi
@@ -4570,6 +4735,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)
@@ -4654,6 +4855,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