All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P . Berrangé" <berrange@redhat.com>
Subject: [PULL 20/40] configure, meson: convert libpmem detection to meson
Date: Tue,  6 Jul 2021 12:01:21 +0200	[thread overview]
Message-ID: <20210706100141.303960-21-pbonzini@redhat.com> (raw)
In-Reply-To: <20210706100141.303960-1-pbonzini@redhat.com>

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure         | 24 ++++--------------------
 meson.build       |  8 ++++----
 meson_options.txt |  2 ++
 3 files changed, 10 insertions(+), 24 deletions(-)

diff --git a/configure b/configure
index 5b18f4fac3..51b8c3290a 100755
--- a/configure
+++ b/configure
@@ -427,7 +427,7 @@ qed=${default_feature:-yes}
 parallels=${default_feature:-yes}
 libxml2="$default_feature"
 debug_mutex="no"
-libpmem="$default_feature"
+libpmem="auto"
 default_devices="true"
 plugins="no"
 fuzzing="no"
@@ -1504,9 +1504,9 @@ for opt do
   ;;
   --disable-debug-mutex) debug_mutex=no
   ;;
-  --enable-libpmem) libpmem=yes
+  --enable-libpmem) libpmem=disabled
   ;;
-  --disable-libpmem) libpmem=no
+  --disable-libpmem) libpmem=enabled
   ;;
   --enable-xkbcommon) xkbcommon="enabled"
   ;;
@@ -4933,22 +4933,6 @@ EOF
   fi
 fi
 
-##########################################
-# check for libpmem
-
-if test "$libpmem" != "no"; then
-	if $pkg_config --exists "libpmem"; then
-		libpmem="yes"
-		libpmem_libs=$($pkg_config --libs libpmem)
-		libpmem_cflags=$($pkg_config --cflags libpmem)
-	else
-		if test "$libpmem" = "yes" ; then
-			feature_not_found "libpmem" "Install nvml or pmdk"
-		fi
-		libpmem="no"
-	fi
-fi
-
 ##########################################
 # check for slirp
 
@@ -6087,7 +6071,7 @@ if test "$skip_meson" = no; then
         -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \
         -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\
         -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \
-        -Dlibdaxctl=$libdaxctl \
+        -Dlibdaxctl=$libdaxctl -Dlibpmem=$libpmem \
         -Dgnutls=$gnutls -Dnettle=$nettle -Dgcrypt=$gcrypt -Dauth_pam=$auth_pam \
         -Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs -Dcap_ng=$cap_ng \
         -Dattr=$attr -Ddefault_devices=$default_devices -Dvirglrenderer=$virglrenderer \
diff --git a/meson.build b/meson.build
index e530829105..e301eda3a5 100644
--- a/meson.build
+++ b/meson.build
@@ -1006,9 +1006,9 @@ if not get_option('libusb').auto() or have_system
 endif
 
 libpmem = not_found
-if 'CONFIG_LIBPMEM' in config_host
-  libpmem = declare_dependency(compile_args: config_host['LIBPMEM_CFLAGS'].split(),
-                               link_args: config_host['LIBPMEM_LIBS'].split())
+if not get_option('libpmem').auto() or have_system
+  libpmem = dependency('libpmem', required: get_option('libpmem'),
+                       method: 'pkg-config', kwargs: static_kwargs)
 endif
 libdaxctl = not_found
 if not get_option('libdaxctl').auto() or have_system
@@ -2822,7 +2822,7 @@ summary_info += {'zstd support':      zstd.found()}
 summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')}
 summary_info += {'libxml2':           config_host.has_key('CONFIG_LIBXML2')}
 summary_info += {'capstone':          capstone_opt == 'disabled' ? false : capstone_opt}
-summary_info += {'libpmem support':   config_host.has_key('CONFIG_LIBPMEM')}
+summary_info += {'libpmem support':   libpmem.found()}
 summary_info += {'libdaxctl support': libdaxctl.found()}
 summary_info += {'libudev':           libudev.found()}
 summary_info += {'FUSE lseek':        fuse_lseek.found()}
diff --git a/meson_options.txt b/meson_options.txt
index 46180000fd..b23174d0a1 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -86,6 +86,8 @@ option('gcrypt', type : 'feature', value : 'auto',
        description: 'libgcrypt cryptography support')
 option('libdaxctl', type : 'feature', value : 'auto',
        description: 'libdaxctl support')
+option('libpmem', type : 'feature', value : 'auto',
+       description: 'libpmem support')
 option('libudev', type : 'feature', value : 'auto',
        description: 'Use libudev to enumerate host devices')
 option('libusb', type : 'feature', value : 'auto',
-- 
2.31.1




  parent reply	other threads:[~2021-07-06 10:32 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 10:01 [PULL 00/40] Misc patches for 2021-07-06 Paolo Bonzini
2021-07-06 10:01 ` [PULL 01/40] Makefile: Remove /usr/bin/env wrapper from the SHELL variable Paolo Bonzini
2021-07-06 10:01 ` [PULL 02/40] softmmu/vl: Remove obsolete comment about the "frame" parameter Paolo Bonzini
2021-07-06 10:01 ` [PULL 03/40] ui: Fix the "-display sdl,window_close=..." parameter Paolo Bonzini
2021-07-06 10:01 ` [PULL 04/40] ui: Mark the '-no-quit' option as deprecated Paolo Bonzini
2021-07-06 10:01 ` [PULL 05/40] qemu-options: Improve the documentation of the -display options Paolo Bonzini
2021-07-06 10:01 ` [PULL 06/40] coverity-scan: Remove lm32 / unicore32 targets Paolo Bonzini
2021-07-06 10:01 ` [PULL 07/40] coverity-scan: switch to vpath build Paolo Bonzini
2021-07-06 10:01 ` [PULL 08/40] target/i386: Declare constants for XSAVE offsets Paolo Bonzini
2021-07-06 10:01 ` [PULL 09/40] target/i386: Consolidate the X86XSaveArea offset checks Paolo Bonzini
2021-07-06 10:01 ` [PULL 10/40] target/i386: Clarify the padding requirements of X86XSaveArea Paolo Bonzini
2021-07-06 10:01 ` [PULL 11/40] target/i386: Pass buffer and length to XSAVE helper Paolo Bonzini
2021-07-06 10:01 ` [PULL 12/40] target/i386: Make x86_ext_save_areas visible outside cpu.c Paolo Bonzini
2021-07-06 10:01 ` [PULL 13/40] target/i386: Observe XSAVE state area offsets Paolo Bonzini
2021-07-06 10:01 ` [PULL 14/40] target/i386: Populate x86_ext_save_areas offsets using cpuid where possible Paolo Bonzini
2021-07-06 10:01 ` [PULL 15/40] target/i386: Move X86XSaveArea into TCG Paolo Bonzini
2021-07-06 10:01 ` [PULL 16/40] configure: drop vte-2.90 check Paolo Bonzini
2021-07-06 10:01 ` [PULL 17/40] configure, meson: convert vte detection to meson Paolo Bonzini
2021-07-06 10:01 ` [PULL 18/40] configure, meson: convert virgl " Paolo Bonzini
2021-07-06 10:01 ` [PULL 19/40] configure, meson: convert libdaxctl " Paolo Bonzini
2021-07-06 10:01 ` Paolo Bonzini [this message]
2021-07-06 10:01 ` [PULL 21/40] configure, meson: convert liburing " Paolo Bonzini
2021-07-06 10:01 ` [PULL 22/40] configure, meson: convert libxml2 " Paolo Bonzini
2021-07-06 10:01 ` [PULL 23/40] meson: sort existing compiler tests Paolo Bonzini
2021-07-06 10:01 ` [PULL 24/40] meson: store dependency('threads') in a variable Paolo Bonzini
2021-07-06 10:01 ` [PULL 25/40] configure, meson: move CONFIG_IVSHMEM to meson Paolo Bonzini
2021-07-06 10:01 ` [PULL 26/40] configure: convert HAVE_BROKEN_SIZE_MAX " Paolo Bonzini
2021-07-06 10:01 ` [PULL 27/40] configure: convert compiler tests to meson, part 1 Paolo Bonzini
2021-07-06 10:01 ` [PULL 28/40] configure: convert compiler tests to meson, part 2 Paolo Bonzini
2021-07-06 10:01 ` [PULL 29/40] configure: convert compiler tests to meson, part 3 Paolo Bonzini
2021-07-06 10:01 ` [PULL 30/40] configure: convert compiler tests to meson, part 4 Paolo Bonzini
2021-07-06 10:01 ` [PULL 31/40] configure: convert compiler tests to meson, part 5 Paolo Bonzini
2021-07-06 10:01 ` [PULL 32/40] configure: convert compiler tests to meson, part 6 Paolo Bonzini
2021-07-06 10:01 ` [PULL 33/40] qom: export more functions for use with non-UserCreatable objects Paolo Bonzini
2021-07-06 10:01 ` [PULL 34/40] keyval: introduce keyval_merge Paolo Bonzini
2021-07-06 10:01 ` [PULL 35/40] keyval: introduce keyval_parse_into Paolo Bonzini
2021-07-06 10:01 ` [PULL 36/40] vl: switch -M parsing to keyval Paolo Bonzini
2021-07-08 16:31   ` Jason Andryuk
2021-07-08 16:31     ` Jason Andryuk
2021-07-13  2:15     ` [PATCH] vl: Parse legacy default_machine_opts Jason Andryuk
2021-07-22 14:12       ` Anthony PERARD via
2021-07-22 14:12         ` Anthony PERARD
2021-07-22 14:39         ` Paolo Bonzini
2021-07-22 14:39           ` Paolo Bonzini
2021-07-12 19:24   ` [PULL 36/40] vl: switch -M parsing to keyval Volker Rümelin
2021-07-13 19:43   ` Alex Williamson
2021-07-13 23:10     ` Alex Williamson
2021-07-14  6:16       ` Mark Cave-Ayland
2021-07-14 22:13         ` Alex Williamson
2021-07-22  8:19   ` Peter Krempa
2021-07-22 14:39     ` Paolo Bonzini
2021-07-22 14:50       ` Peter Krempa
2021-07-06 10:01 ` [PULL 37/40] machine: add smp compound property Paolo Bonzini
2021-07-13 10:37   ` Peter Maydell
2021-07-13 11:07     ` Markus Armbruster
2021-07-13 10:53   ` Peter Maydell
2021-07-06 10:01 ` [PULL 38/40] qemu-option: remove now-dead code Paolo Bonzini
2021-07-06 10:01 ` [PULL 39/40] Set icon for QEMU binary on Mac OS Paolo Bonzini
2021-07-06 10:01 ` [PULL 40/40] config-host.mak: remove unused compiler-related lines Paolo Bonzini
2021-07-06 12:10 ` [PULL 00/40] Misc patches for 2021-07-06 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210706100141.303960-21-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.