Revision d5970055 configure

b/configure
263 263
vnc_sasl=""
264 264
xen=""
265 265
linux_aio=""
266
vhost_net=""
266 267

  
267 268
gprof="no"
268 269
debug_tcg="no"
......
653 654
  ;;
654 655
  --enable-docs) docs="yes"
655 656
  ;;
657
  --disable-vhost-net) vhost_net="no"
658
  ;;
659
  --enable-vhost-net) vhost_net="yes"
660
  ;;
656 661
  *) echo "ERROR: unknown option $opt"; show_help="yes"
657 662
  ;;
658 663
  esac
......
811 816
echo "  --kerneldir=PATH         look for kernel includes in PATH"
812 817
echo "  --enable-docs            enable documentation build"
813 818
echo "  --disable-docs           disable documentation build"
819
echo "  --disable-vhost-net      disable vhost-net acceleration support"
820
echo "  --enable-vhost-net       enable vhost-net acceleration support"
814 821
echo ""
815 822
echo "NOTE: The object files are built at the place where configure is launched"
816 823
exit 1
......
1503 1510
fi
1504 1511

  
1505 1512
##########################################
1513
# test for vhost net
1514

  
1515
if test "$vhost_net" != "no"; then
1516
    if test "$kvm" != "no"; then
1517
            cat > $TMPC <<EOF
1518
    #include <linux/vhost.h>
1519
    int main(void) { return 0; }
1520
EOF
1521
            if compile_prog "$kvm_cflags" "" ; then
1522
                vhost_net=yes
1523
            else
1524
                if test "$vhost_net" = "yes" ; then
1525
                    feature_not_found "vhost-net"
1526
                fi
1527
                vhost_net=no
1528
            fi
1529
    else
1530
            if test "$vhost_net" = "yes" ; then
1531
                echo -e "NOTE: vhost-net feature requires KVM (--enable-kvm)."
1532
                feature_not_found "vhost-net"
1533
            fi
1534
            vhost_net=no
1535
    fi
1536
fi
1537

  
1538
##########################################
1506 1539
# pthread probe
1507 1540
PTHREADLIBS_LIST="-lpthread -lpthreadGC2"
1508 1541

  
......
1988 2021
echo "preadv support    $preadv"
1989 2022
echo "fdatasync         $fdatasync"
1990 2023
echo "uuid support      $uuid"
2024
echo "vhost-net support $vhost_net"
1991 2025

  
1992 2026
if test $sdl_too_old = "yes"; then
1993 2027
echo "-> Your SDL version is too old - please upgrade to have SDL support"
......
2522 2556
      if test "$kvm_para" = "yes"; then
2523 2557
        echo "CONFIG_KVM_PARA=y" >> $config_target_mak
2524 2558
      fi
2559
      if test $vhost_net = "yes" ; then
2560
        echo "CONFIG_VHOST_NET=y" >> $config_target_mak
2561
      fi
2525 2562
    fi
2526 2563
esac
2527 2564
if test "$target_bigendian" = "yes" ; then

Also available in: Unified diff