ram: remove support for loading v1
[qemu] / configure
index abd38dd..5232172 100755 (executable)
--- a/configure
+++ b/configure
@@ -221,6 +221,7 @@ kerneldir=""
 aix="no"
 blobs="yes"
 pkgversion=""
+check_utests="no"
 
 # OS specific
 if check_define __linux__ ; then
@@ -518,6 +519,10 @@ for opt do
   ;;
   --enable-fdt) fdt="yes"
   ;;
+  --disable-check-utests) check_utests="no"
+  ;;
+  --enable-check-utests) check_utests="yes"
+  ;;
   --disable-nptl) nptl="no"
   ;;
   --enable-nptl) nptl="yes"
@@ -653,6 +658,8 @@ echo "  --disable-curl           disable curl connectivity"
 echo "  --enable-curl            enable curl connectivity"
 echo "  --disable-fdt            disable fdt device tree"
 echo "  --enable-fdt             enable fdt device tree"
+echo "  --disable-check-utests   disable check unit-tests"
+echo "  --enable-check-utests    enable check unit-tests"
 echo "  --disable-bluez          disable bluez stack connectivity"
 echo "  --enable-bluez           enable bluez stack connectivity"
 echo "  --disable-kvm            disable KVM acceleration support"
@@ -993,7 +1000,7 @@ fi
 
 ##########################################
 # VNC SASL detection
-if test "$vnc_sasl" = "yes" ; then
+if test "$vnc_sasl" != "no" ; then
   cat > $TMPC <<EOF
 #include <sasl/sasl.h>
 #include <stdio.h>
@@ -1213,6 +1220,26 @@ EOF
 fi # test "$curl"
 
 ##########################################
+# check framework probe
+
+if test "$check_utests" != "no" ; then
+  cat > $TMPC << EOF
+#include <check.h>
+int main(void) { suite_create("qemu test"); return 0; }
+EOF
+  check_libs=`pkg-config --libs check`
+  if compile_prog "" $check_libs ; then
+    check_utests=yes
+    libs_tools="$check_libs $libs_tools"
+  else
+    if test "$check_utests" = "yes" ; then
+      feature_not_found "check"
+    fi
+    check_utests=no
+  fi
+fi # test "$check_utests"
+
+##########################################
 # bluez support probe
 if test "$bluez" != "no" ; then
   cat > $TMPC << EOF
@@ -1302,7 +1329,7 @@ for pthread_lib in $PTHREADLIBS_LIST; do
   fi
 done
 
-if test "$pthread" = no; then
+if test "$mingw32" != yes -a "$pthread" = no; then
   echo
   echo "Error: pthread check failed"
   echo "Make sure to have the pthread libs and headers installed."
@@ -1327,6 +1354,7 @@ EOF
     if test "$linux_aio" = "yes" ; then
       feature_not_found "linux AIO"
     fi
+    linux_aio=no
   fi
 fi
 
@@ -1474,6 +1502,21 @@ if compile_prog "" "" ; then
   splice=yes
 fi
 
+# check if eventfd is supported
+eventfd=no
+cat > $TMPC << EOF
+#include <sys/eventfd.h>
+
+int main(void)
+{
+    int efd = eventfd(0, 0);
+    return 0;
+}
+EOF
+if compile_prog "" "" ; then
+  eventfd=yes
+fi
+
 # Check if tools are available to build documentation.
 if test "$docs" != "no" ; then
   if test -x "`which texi2html 2>/dev/null`" -a \
@@ -1646,6 +1689,7 @@ fi
 echo "SDL support       $sdl"
 echo "curses support    $curses"
 echo "curl support      $curl"
+echo "check support     $check_utests"
 echo "mingw32 support   $mingw32"
 echo "Audio drivers     $audio_drv_list"
 echo "Extra audio cards $audio_card_list"
@@ -1813,6 +1857,9 @@ fi
 if test "$splice" = "yes" ; then
   echo "CONFIG_SPLICE=y" >> $config_host_mak
 fi
+if test "$eventfd" = "yes" ; then
+  echo "CONFIG_EVENTFD=y" >> $config_host_mak
+fi
 if test "$inotify" = "yes" ; then
   echo "CONFIG_INOTIFY=y" >> $config_host_mak
 fi
@@ -1880,6 +1927,11 @@ if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
   tools="qemu-img\$(EXESUF) $tools"
   if [ "$linux" = "yes" ] ; then
       tools="qemu-nbd\$(EXESUF) qemu-io\$(EXESUF) $tools"
+    if [ "$check_utests" = "yes" ]; then
+      tools="check-qint check-qstring check-qdict $tools"
+    fi
+  elif test "$mingw32" = "yes" ; then
+      tools="qemu-io\$(EXESUF) $tools"
   fi
 fi
 echo "TOOLS=$tools" >> $config_host_mak
@@ -2356,10 +2408,12 @@ done # for target in $targets
 # build tree in object directory if source path is different from current one
 if test "$source_path_used" = "yes" ; then
     DIRS="tests tests/cris slirp audio block pc-bios/optionrom"
+    DIRS="$DIRS roms/pcbios roms/seabios roms/vgabios"
     FILES="Makefile tests/Makefile"
     FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit"
     FILES="$FILES tests/test-mmap.c"
     FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps pc-bios/video.x"
+    FILES="$FILES roms/pcbios/Makefile roms/seabios/Makefile roms/vgabios/Makefile"
     for bios_file in $source_path/pc-bios/*.bin $source_path/pc-bios/*.dtb $source_path/pc-bios/openbios-*; do
         FILES="$FILES pc-bios/`basename $bios_file`"
     done
@@ -2373,6 +2427,20 @@ if test "$source_path_used" = "yes" ; then
     done
 fi
 
+# temporary config to build submodules
+for rom in seabios vgabios pcbios; do
+    config_mak=roms/$rom/config.mak
+    echo "# Automatically generated by configure - do not modify" >> $config_mak
+    echo "SRC_PATH=$source_path/roms/$rom" >> $config_mak
+    echo "CC=$cc" >> $config_mak
+    echo "BCC=bcc" >> $config_mak
+    echo "CPP=${cross_prefix}cpp" >> $config_mak
+    echo "OBJCOPY=objcopy" >> $config_mak
+    echo "IASL=iasl" >> $config_mak
+    echo "HOST_CC=$host_cc" >> $config_mak
+    echo "LD=$ld" >> $config_mak
+done
+
 for hwlib in 32 64; do
   d=libhw$hwlib
   mkdir -p $d