]> git.proxmox.com Git - mirror_qemu.git/blobdiff - configure
qemu/net: request 3 vectors in virtio-net
[mirror_qemu.git] / configure
index 3a34e00e433a0a8acf873360fd136db35943ccb6..33e3c411748b5d352f5d4f06814340b95e95e008 100755 (executable)
--- a/configure
+++ b/configure
@@ -190,7 +190,7 @@ io_thread="no"
 nptl="yes"
 mixemu="no"
 bluez="yes"
-kvm="yes"
+kvm="no"
 kerneldir=""
 aix="no"
 blobs="yes"
@@ -290,7 +290,6 @@ SunOS)
     make="gmake"
     install="ginstall"
     needs_libsunmath="no"
-    kvm="no"
     solarisrev=`uname -r | cut -f2 -d.`
     # have to select again, because `uname -m` returns i86pc
     # even on an x86_64 box.
@@ -330,6 +329,7 @@ audio_possible_drivers="oss alsa sdl esd pa"
 linux="yes"
 linux_user="yes"
 usb="linux"
+kvm="yes"
 if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
     kqemu="yes"
     audio_possible_drivers="$audio_possible_drivers fmod"
@@ -356,11 +356,7 @@ else
 fi
 [ -f "$workdir/vl.c" ] || source_path_used="yes"
 
-werror="no"
-# generate compile errors on warnings for development builds
-#if grep cvs $source_path/VERSION > /dev/null 2>&1 ; then
-#werror="yes";
-#fi
+werror=""
 
 for opt do
   optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
@@ -517,8 +513,21 @@ if test "$debug" = "no" ; then
 fi
 CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
 LDFLAGS="$LDFLAGS -g"
+
+# Consult white-list to determine whether to enable werror
+# by default.  Only enable by default for git builds
+if test -z "$werror" ; then
+    z_version=`cut -f3 -d. $source_path/VERSION`
+    if test "$z_version" = "50" -a \
+        "$linux" = "yes" ; then
+        werror="yes"
+    else
+        werror="no"
+    fi
+fi
+
 if test "$werror" = "yes" ; then
-CFLAGS="$CFLAGS -Werror"
+    CFLAGS="$CFLAGS -Werror"
 fi
 
 if test "$solaris" = "no" ; then
@@ -599,7 +608,7 @@ echo "  --install=INSTALL        use specified install [$install]"
 echo "  --static                 enable static build [$static]"
 echo "  --enable-debug-tcg       enable TCG debugging"
 echo "  --disable-debug-tcg      disable TCG debugging (default)"
-echo "  --disable-debug          enable common debug build options"
+echo "  --enable-debug           enable common debug build options"
 echo "  --enable-sparse          enable sparse checker"
 echo "  --disable-sparse         disable sparse checker (default)"
 echo "  --disable-strip          disable stripping binaries"
@@ -705,6 +714,7 @@ ppc64-softmmu \
 sh4-softmmu \
 sh4eb-softmmu \
 sparc-softmmu \
+sparc64-softmmu \
 "
     fi
 # the following are Linux specific
@@ -1158,7 +1168,9 @@ EOF
        | grep "error: " \
        | awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'`
       if test "$kvmerr" != "" ; then
-        kvm="no - (${kvmerr})"
+        kvm="no - (${kvmerr})\n\
+    NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
+recent kvm-kmod from http://sourceforge.net/projects/kvm."
       fi
     fi
   fi
@@ -1274,6 +1286,63 @@ EOF
   fi
 fi
 
+# check if utimensat and futimens are supported
+utimens=no
+cat > $TMPC << EOF
+#define _ATFILE_SOURCE
+#define _GNU_SOURCE
+#include <stddef.h>
+#include <fcntl.h>
+
+int main(void)
+{
+    utimensat(AT_FDCWD, "foo", NULL, 0);
+    futimens(0, NULL);
+    return 0;
+}
+EOF
+if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
+  utimens=yes
+fi
+
+# check if pipe2 is there
+pipe2=no
+cat > $TMPC << EOF
+#define _GNU_SOURCE
+#include <unistd.h>
+#include <fcntl.h>
+
+int main(void)
+{
+    int pipefd[2];
+    pipe2(pipefd, O_CLOEXEC);
+    return 0;
+}
+EOF
+if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
+  pipe2=yes
+fi
+
+# check if tee/splice is there. vmsplice was added same time.
+splice=no
+cat > $TMPC << EOF
+#define _GNU_SOURCE
+#include <unistd.h>
+#include <fcntl.h>
+#include <limits.h>
+
+int main(void)
+{
+    int len, fd;
+    len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK);
+    splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE);
+    return 0;
+}
+EOF
+if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
+  splice=yes
+fi
+
 # Check if tools are available to build documentation.
 if test "$build_docs" = "yes" -a \( ! -x "`which texi2html 2>/dev/null`" -o ! -x "`which pod2man 2>/dev/null`" \) ; then
   build_docs="no"
@@ -1377,7 +1446,7 @@ echo "vde support       $vde"
 echo "AIO support       $aio"
 echo "IO thread         $io_thread"
 echo "Install blobs     $blobs"
-echo "KVM support       $kvm"
+echo -e "KVM support       $kvm"
 echo "fdt support       $fdt"
 echo "preadv support    $preadv"
 
@@ -1671,6 +1740,15 @@ fi
 if test "$atfile" = "yes" ; then
   echo "#define CONFIG_ATFILE 1" >> $config_h
 fi
+if test "$utimens" = "yes" ; then
+  echo "#define CONFIG_UTIMENSAT 1" >> $config_h
+fi
+if test "$pipe2" = "yes" ; then
+  echo "#define CONFIG_PIPE2 1" >> $config_h
+fi
+if test "$splice" = "yes" ; then
+  echo "#define CONFIG_SPLICE 1" >> $config_h
+fi
 if test "$inotify" = "yes" ; then
   echo "#define CONFIG_INOTIFY 1" >> $config_h
 fi
@@ -1740,7 +1818,11 @@ esac
 # Determine what linker flags to use to force archive inclusion
 check_linker_flags()
 {
-    $cc $ARCH_CFLAGS -o $TMPE $OS_CFLAGS $TMPC -Wl,$1 -Wl,$2 >/dev/null 2>/dev/null
+    w2=
+    if test "$2" ; then
+       w2=-Wl,$2
+    fi
+    $cc $ARCH_CFLAGS -o $TMPE $OS_CFLAGS $TMPC -Wl,$1 ${w2} >/dev/null 2>/dev/null
 }
 
 cat > $TMPC << EOF
@@ -1754,6 +1836,10 @@ elif check_linker_flags -z,allextract -z,defaultextract ; then
     # Solaris ld
     echo "ARLIBS_BEGIN=-Wl,-z,allextract" >> $config_mak
     echo "ARLIBS_END=-Wl,-z,defaultextract" >> $config_mak
+elif check_linker_flags -all_load ; then
+    # Mac OS X
+    echo "ARLIBS_BEGIN=-all_load" >> $config_mak
+    echo "ARLIBS_END=" >> $config_mak
 else
     echo "Error: your linker does not support --whole-archive or -z."
     echo "Please report to qemu-devel@nongnu.org"