Add Virtual Distributed Ethernet native support, by Luca Bigliardi.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4896 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/configure b/configure
index 51be6e7..f9707cd 100755
--- a/configure
+++ b/configure
@@ -89,6 +89,7 @@
 EXESUF=""
 gdbstub="yes"
 slirp="yes"
+vde="no"
 fmod_lib=""
 fmod_inc=""
 vnc_tls="yes"
@@ -280,6 +281,8 @@
   ;;
   --disable-slirp) slirp="no"
   ;;
+  --enable-vde) vde="yes"
+  ;;
   --disable-kqemu) kqemu="no"
   ;;
   --disable-brlapi) brlapi="no"
@@ -432,6 +435,7 @@
 echo "  --fmod-inc               path to FMOD includes"
 echo "  --enable-uname-release=R Return R for uname -r in usermode emulation"
 echo "  --sparc_cpu=V            Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9"
+echo "  --enable-vde             enable support for vde network [$vde]"
 echo ""
 echo "NOTE: The object files are built at the place where configure is launched"
 exit 1
@@ -722,6 +726,24 @@
 fi
 
 ##########################################
+# vde libraries probe
+if test "$vde" = "yes" ; then
+  cat > $TMPC << EOF
+#include <libvdeplug.h>
+int main(void) { struct vde_open_args a = {0, 0, 0} ; return 0;}
+EOF
+    if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
+        :
+    else
+        echo
+        echo "Error: VDE check failed"
+        echo "Make sure to have the VDE libs and headers installed."
+        echo
+        exit 1
+    fi
+fi
+
+##########################################
 # Sound support libraries probe
 
 audio_drv_probe()
@@ -874,6 +896,7 @@
 [ ! -z "$uname_release" ] && \
 echo "uname -r          $uname_release"
 echo "NPTL support      $nptl"
+echo "vde support       $vde"
 
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1038,6 +1061,11 @@
   echo "CONFIG_SLIRP=yes" >> $config_mak
   echo "#define CONFIG_SLIRP 1" >> $config_h
 fi
+if test "$vde" = "yes" ; then
+  echo "CONFIG_VDE=yes" >> $config_mak
+  echo "#define CONFIG_VDE 1" >> $config_h
+  echo "VDE_LIBS=-lvdeplug" >> $config_mak
+fi
 for card in $audio_card_list; do
     def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'`
     echo "$def=yes" >> $config_mak