Merge branch 'features/smp' into tizen_next
[sdk/emulator/qemu.git] / configure
index 0a0a5b0..20925ef 100755 (executable)
--- a/configure
+++ b/configure
@@ -319,13 +319,12 @@ libnfs=""
 coroutine=""
 coroutine_pool=""
 seccomp=""
-gl="yes"
 
-# for TIZEN-maru 
+# for TIZEN-maru
 maru="no"
 shm="no"
 libav="no"
-png="no"
+libpng="no"
 #
 glusterfs=""
 glusterfs_discard="no"
@@ -909,10 +908,6 @@ for opt do
   ;;
   --enable-kvm) kvm="yes"
   ;;
-  --disable-gl) gl="no"
-  ;;
-  --enable-gl) gl="yes"
-  ;;
   --disable-hax) hax="no"
   ;;
   --enable-hax) hax="yes"
@@ -973,7 +968,9 @@ for opt do
   ;;
   --enable-uname-release=*) uname_release="$optarg"
   ;;
-  --enable-werror) werror="yes"
+  --enable-werror)
+      werror="yes" ;
+      force_werror="yes" ;
   ;;
   --disable-werror) werror="no"
   ;;
@@ -1104,7 +1101,9 @@ for opt do
   ;;
   --enable-libav) libav="yes"
   ;;
-  --enable-png) png="yes"
+  --disable-libav) libav="no"
+  ;;
+  --enable-libpng) libpng="yes"
   ;;
 #
   --disable-glusterfs) glusterfs="no"
@@ -1409,8 +1408,6 @@ Advanced options (experts only):
 
   --disable-hax            disable HAX acceleration support
   --enable-hax             enable HAX acceleration support
-  --disable-gl             disable GL acceleration support
-  --enable-gl              enable GL acceleration support
   --enable-yagl            enable YaGL device
   --disable-yagl           disable YaGL device
   --enable-yagl-stats      enable YaGL stats
@@ -1422,7 +1419,8 @@ TIZEN-maru options:
   --enable-maru            enable maru board
   --enable-shm             enable shared memory for framebuffer
   --enable-libav           enable libav library
-  --enable-png             enable png 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
@@ -3878,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
 
 ########################################
@@ -3993,12 +3993,11 @@ if test "$libav" != "no"; then
         libav_cflags=`$pkg_config --cflags $libavcodec_package`
         libav_libs=`$pkg_config --libs $libavcodec_package`
         libs_softmmu="$libav_libs $libs_softmmu"
-        QEMU_CFLAGS="$QEMU_CFLAGS $libav_cflags"
         libav="yes"
     else
-        if test "$libav" = "yes" ; then
-            feature_not_found "libav"
-        fi
+        #if test "$libav" = "yes" ; then
+        #    feature_not_found "libav"
+        #fi
         libav="no"
     fi
 
@@ -4007,9 +4006,9 @@ if test "$libav" != "no"; then
         libs_softmmu="$libav_libs $libs_softmmu"
         libav="yes"
     else
-        if test "$libav" = "yes" ; then
-            feature_not_found "libav"
-        fi
+        #if test "$libav" = "yes" ; then
+        #    feature_not_found "libav"
+        #fi
         libav="no"
     fi
 
@@ -4018,9 +4017,9 @@ if test "$libav" != "no"; then
         libs_softmmu="$libav_libs $libs_softmmu"
         libav="yes"
     else
-        if test "$libav" = "yes" ; then
-            feature_not_found "libav"
-        fi
+        #if test "$libav" = "yes" ; then
+        #    feature_not_found "libav"
+        #fi
         libav="no"
     fi
 
@@ -4029,31 +4028,30 @@ if test "$libav" != "no"; then
         libs_softmmu="$libav_libs $libs_softmmu"
         libav="yes"
     else
-        if test "$libav" = "yes" ; then
-            feature_not_found "libav"
-        fi
+        #if test "$libav" = "yes" ; then
+        #    feature_not_found "libav"
+        #fi
         libav="no"
     fi
 
 fi
 
 ##########################################
-# png probe
+# libpng probe
 
-if test "$png" != "no"; then
-    png_package="libpng"
+if test "$libpng" != "no"; then
+    libpng_package="libpng"
 
-    if $pkg_config --exists "$png_package" ; then
-        png_cflags=`$pkg_config --cflags $png_package`
-        png_libs=`$pkg_config --libs $png_package`
-        libs_softmmu="$png_libs $libs_softmmu"
-        QEMU_CFLAGS="$QEMU_CFLAGS $png_cflags"
-        png="yes"
+    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 "$png" = "yes" ; then
-            feature_not_found "png"
+        if test "$libpng" = "yes" ; then
+            feature_not_found "libpng"
         fi
-        png="no"
+        libpng="no"
     fi
 fi
 
@@ -4137,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"
@@ -4340,7 +4344,6 @@ echo "lzo support       $lzo"
 echo "snappy support    $snappy"
 
 echo "HAX support       $hax"
-echo "GL support        $gl"
 echo "YaGL support      $yagl"
 echo "YaGL stats        $yagl_stats"
 echo "OpenGL support    $opengl"
@@ -4350,7 +4353,7 @@ echo "VIGS support      $vigs"
 echo "TIZEN-maru support $maru"
 echo "TIZEN-maru shared framebuffer support $shm"
 echo "TIZEN-maru libav support $libav"
-echo "TIZEN-maru png support $png"
+echo "TIZEN-maru libpng support $libpng"
 #
 
 if test "$sdl_too_old" = "yes"; then
@@ -4666,11 +4669,12 @@ fi
 if test "$yagl" = "yes" ; then
   echo "CONFIG_YAGL=y" >> $config_host_mak
   if test "$linux" = "yes" ; then
-    echo -n;
+    LIBS="-lGLU -ldl $LIBS"
   elif test "$mingw32" = "yes" ; then
-    echo -n;
+    LIBS="-lopengl32 -lglu32 $LIBS"
   elif test "$darwin" = "yes" ; then
-    echo -n;  else
+    LIBS="-framework OpenGL -framework AGL -framework GLUT $LIBS"
+  else
     echo "ERROR: YaGL is not available on $targetos"
     exit 1
   fi
@@ -4836,14 +4840,13 @@ 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
 if test "$libav" = "yes" ; then
   echo "CONFIG_LIBAV=y" >> $config_host_mak
+  echo "LIBAV_CFLAGS=$libav_cflags" >> $config_host_mak
 fi
-if test "$png" = "yes" ; then
+if test "$libpng" = "yes" ; then
   echo "CONFIG_PNG=y" >> $config_host_mak
+  echo "LIBPNG_CFLAGS=$libpng_cflags" >> $config_host_mak
 fi
 
 # TPM passthrough support?
@@ -4891,15 +4894,6 @@ 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
@@ -5227,23 +5221,6 @@ if test "$hax" = "yes" ; then
     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