about summary refs log tree commit diff
path: root/meson.build
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2025-08-01 19:15:13 +0200
committerMichael Biebl <biebl@debian.org>2025-08-01 19:15:13 +0200
commit7e9091a5960f67a84787c03153324915220e4816 (patch)
treedc743de962532932ebc3b4ed3a36ddd093d97d68 /meson.build
parent582eb4472a0f3375042afb9026cbeb50e058a27d (diff)
New upstream version 1.54.0 upstream/1.54.0
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build25
1 files changed, 18 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index 847f72b5..2eac4ed7 100644
--- a/meson.build
+++ b/meson.build
@@ -5,7 +5,7 @@ project(
 # NOTE: When incrementing version also add corresponding
 #       NM_VERSION_x_y_z macros in
 #       "src/libnm-core-public/nm-version-macros.h.in"
-  version: '1.52.1',
+  version: '1.54.0',
   license: 'GPL2+',
   default_options: [
     'buildtype=debugoptimized',
@@ -137,6 +137,9 @@ config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix:
 config_h.set10('HAVE_DECL_EXPLICIT_BZERO', cc.has_function('explicit_bzero', prefix: '#include <string.h>'))
 config_h.set10('HAVE_DECL_MEMFD_CREATE', cc.has_function('memfd_create', prefix: '#include <sys/mman.h>'))
 
+config_h.set10('HAVE_DLVSYM', cc.has_function('dlvsym', prefix: '''#define _GNU_SOURCE
+                                                                   #include <dlfcn.h>'''))
+
 # types
 config_h.set('SIZEOF_PID_T', cc.sizeof('pid_t', prefix : '#include <sys/types.h>'))
 config_h.set('SIZEOF_UID_T', cc.sizeof('uid_t', prefix : '#include <sys/types.h>'))
@@ -173,13 +176,13 @@ endif
 
 enable_lto = get_option('b_lto')
 if enable_lto
-  if  cc.get_id() == 'clang'
-    clang_version = cc.version()
-    if clang_version <= '18.0.0'
-      error('Clang version should be greater then 18.0.0 got : ' + clang_version)
+  cc_version = cc.version()
+  if cc.get_id() == 'clang'
+    if cc_version <= '18.0.0'
+      error('Clang version should be greater than 18.0.0, got : ' + cc_version)
     endif
-  else
-    # Meson already adds '-flto'
+  elif cc_version < '12.0'
+    # GCC < 12 breaks libnm symbol versioning with LTO, use workarounds
     lto_flag = '-flto-partition=none'
     assert(cc.has_argument(lto_flag), '-flto-partition=none not supported. Disable link-time optimization with -Db_lto=false.')
     common_flags += lto_flag
@@ -929,6 +932,14 @@ if python.found()
   config_h.set_quoted('TEST_NM_PYTHON', python_path)
 endif
 
+# libnvme (NBFT support)
+enable_nbft = get_option('nbft')
+if enable_nbft
+  libnvme_dep = dependency('libnvme', version: '>= 1.5', required: false)
+  assert(libnvme_dep.found(), 'NBFT support was requested, but the libnvme library is not available. Use -Dnbft=false to build without it.')
+endif
+config_h.set10('WITH_NBFT', enable_nbft)
+
 data_conf = configuration_data()
 data_conf.set('DISTRO_NETWORK_SERVICE',                  (enable_ifcfg_rh ? 'network.service' : ''))
 data_conf.set('NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT',    config_default_logging_audit)