qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 17/24] configure, meson: move netmap detection to meson


From: Thomas Huth
Subject: Re: [PATCH 17/24] configure, meson: move netmap detection to meson
Date: Thu, 7 Oct 2021 19:55:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 07/10/2021 15.08, Paolo Bonzini wrote:
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
  configure         | 40 ++++------------------------------------
  meson.build       | 19 ++++++++++++++++++-
  meson_options.txt |  2 ++
  net/meson.build   |  4 +++-
  4 files changed, 27 insertions(+), 38 deletions(-)

diff --git a/configure b/configure
index a2b1d54be8..bb3bb3e58f 100755
--- a/configure
+++ b/configure
@@ -292,7 +292,7 @@ iconv="auto"
  curses="auto"
  docs="auto"
  fdt="auto"
-netmap="no"
+netmap="auto"
  sdl="auto"
  sdl_image="auto"
  virtiofsd="auto"
@@ -701,7 +701,6 @@ FreeBSD)
    bsd_user="yes"
    make="${MAKE-gmake}"
    # needed for kinfo_getvmmap(3) in libutil.h
-  netmap=""  # enable netmap autodetect
  ;;
  DragonFly)
    bsd="yes"
@@ -1026,9 +1025,9 @@ for opt do
    ;;
    --enable-vde) vde="enabled"
    ;;
-  --disable-netmap) netmap="no"
+  --disable-netmap) netmap="disabled"
    ;;
-  --enable-netmap) netmap="yes"
+  --enable-netmap) netmap="enabled"
    ;;
    --disable-xen) xen="disabled"
    ;;
@@ -2901,34 +2900,6 @@ EOF
    fi
  fi
-##########################################
-# netmap support probe
-# Apart from looking for netmap headers, we make sure that the host API version
-# supports the netmap backend (>=11). The upper bound (15) is meant to simulate
-# a minor/major version number. Minor new features will be marked with values 
up
-# to 15, and if something happens that requires a change to the backend we will
-# move above 15, submit the backend fixes and modify this two bounds.
-if test "$netmap" != "no" ; then
-  cat > $TMPC << EOF
-#include <inttypes.h>
-#include <net/if.h>
-#include <net/netmap.h>
-#include <net/netmap_user.h>
-#if (NETMAP_API < 11) || (NETMAP_API > 15)
-#error
-#endif
-int main(void) { return 0; }
-EOF
-  if compile_prog "" "" ; then
-    netmap=yes
-  else
-    if test "$netmap" = "yes" ; then
-      feature_not_found "netmap"
-    fi
-    netmap=no
-  fi
-fi
-
  ##########################################
  # plugin linker support probe
@@ -4173,9 +4144,6 @@ if test "$slirp_smbd" = "yes" ; then
    echo "CONFIG_SLIRP_SMBD=y" >> $config_host_mak
    echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
  fi
-if test "$netmap" = "yes" ; then
-  echo "CONFIG_NETMAP=y" >> $config_host_mak
-fi
  if test "$l2tpv3" = "yes" ; then
    echo "CONFIG_L2TPV3=y" >> $config_host_mak
  fi
@@ -4722,7 +4690,7 @@ if test "$skip_meson" = no; then
          -Dalsa=$alsa -Dcoreaudio=$coreaudio -Ddsound=$dsound -Djack=$jack 
-Doss=$oss \
          -Dpa=$pa -Daudio_drv_list=$audio_drv_list 
-Dtcg_interpreter=$tcg_interpreter \
          -Dtrace_backends=$trace_backends -Dtrace_file=$trace_file 
-Dlinux_aio=$linux_aio \
-        -Dvde=$vde \
+        -Dnetmap=$netmap -Dvde=$vde \
          $cross_arg \
          "$PWD" "$source_path"
diff --git a/meson.build b/meson.build
index 46d8798a19..96f87630f0 100644
--- a/meson.build
+++ b/meson.build
@@ -1659,6 +1659,23 @@ config_host_data.set('HAVE_MLOCKALL', 
cc.links(gnu_source_prefix + '''
      return mlockall(MCL_FUTURE);
    }'''))
+have_netmap = false
+if not get_option('netmap').disabled() and targetos == 'freebsd'

The "and targetos == 'freebsd'" seems wrong. netmap is also usable on Linux, and I cannot use --enable-netmap anymore after this patch. It works again once I removed the freebsd check here.

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]