about summary refs log tree commit diff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build142
1 files changed, 71 insertions, 71 deletions
diff --git a/meson.build b/meson.build
index 4767edab..02bfb000 100644
--- a/meson.build
+++ b/meson.build
@@ -6,7 +6,7 @@ project(
 #  - add corresponding NM_VERSION_x_y_z macros in
 #    "shared/nm-version-macros.h.in"
 #  - update number in configure.ac
-  version: '1.26.2',
+  version: '1.28.0',
   license: 'GPL2+',
   default_options: [
     'buildtype=debugoptimized',
@@ -56,6 +56,8 @@ nm_pkgstatedir = join_paths(nm_localstatedir, 'lib', nm_name)
 nm_vpndir = join_paths(nm_libdir, nm_name)
 nm_plugindir = join_paths(nm_libdir, nm_name, dist_version)
 
+introspection_extra_cflags = ['-Wno-incompatible-pointer-types-discards-qualifiers']
+
 libnm_name = 'libnm'
 
 current = 1
@@ -65,8 +67,6 @@ libnm_version = '@0@.@1@.@2@'.format(current - age, age, revision)
 
 libnm_pkgincludedir = join_paths(nm_includedir, libnm_name)
 
-nm_debug = get_option('buildtype').contains('debug')
-
 gnome = import('gnome')
 i18n = import('i18n')
 pkg = import('pkgconfig')
@@ -173,67 +173,64 @@ if enable_lto
   common_ldflags += lto_flag
 endif
 
-if nm_debug
-  common_flags += cc.get_supported_arguments([
-    '-Wall',
-    '-Wextra',
-    '-Wdeclaration-after-statement',
-    '-Wfloat-equal',
-    '-Wformat-nonliteral',
-    '-Wformat-security',
-    '-Wimplicit-function-declaration',
-    '-Winit-self',
-    '-Wlogical-op',
-    '-Wmissing-declarations',
-    '-Wmissing-include-dirs',
-    '-Wmissing-prototypes',
-    '-Wpointer-arith',
-    '-Wshadow',
-    '-Wshift-negative-value',
-    '-Wstrict-prototypes',
-    '-Wundef',
-    '-Wvla',
-    '-Wno-duplicate-decl-specifier',
-    '-Wno-format-truncation',
-    '-Wno-format-y2k',
-    '-Wno-gnu-variable-sized-type-not-at-end',
-    '-Wno-missing-field-initializers',
-    '-Wno-pragmas',
-    '-Wno-sign-compare',
-    '-Wno-tautological-constant-out-of-range-compare',
-    '-Wno-unknown-pragmas',
-    '-Wno-unused-parameter',
-    '-Wparentheses-equality',
-    '-Wpointer-arith',
-    '-Wshadow',
-    '-Wstrict-prototypes',
-    '-Wtypedef-redefinition',
-    '-Wundef',
-    '-Wunknown-attributes',
-    '-fno-strict-aliasing',
-  ])
-
-  if cc.has_argument('-Wimplicit-fallthrough')
-    if cc.compiles('''
-                   int main(int argc, char **argv) {
-                       int r = 0;
-                       switch (argc) {
-                       case 0:
-                           r++;
-                           /* fall-through */
-                       case 1:
-                           r++;
-                           break;
-                       }
-                       return r;
-                   }
-                   ''',
-                   args: '-Werror=implicit-fallthrough',
-                   name: '-Werror=implicit-fallthrough')
-      common_flags += '-Wimplicit-fallthrough'
-    endif
+common_flags += cc.get_supported_arguments([
+  '-Wall',
+  '-Wextra',
+  '-Wdeclaration-after-statement',
+  '-Wfloat-equal',
+  '-Wformat-nonliteral',
+  '-Wformat-security',
+  '-Wimplicit-function-declaration',
+  '-Winit-self',
+  '-Wlogical-op',
+  '-Wmissing-declarations',
+  '-Wmissing-include-dirs',
+  '-Wmissing-prototypes',
+  '-Wpointer-arith',
+  '-Wshadow',
+  '-Wshift-negative-value',
+  '-Wstrict-prototypes',
+  '-Wundef',
+  '-Wvla',
+  '-Wno-duplicate-decl-specifier',
+  '-Wno-format-truncation',
+  '-Wno-format-y2k',
+  '-Wno-gnu-variable-sized-type-not-at-end',
+  '-Wno-missing-field-initializers',
+  '-Wno-pragmas',
+  '-Wno-sign-compare',
+  '-Wno-tautological-constant-out-of-range-compare',
+  '-Wno-unknown-pragmas',
+  '-Wno-unused-parameter',
+  '-Wparentheses-equality',
+  '-Wpointer-arith',
+  '-Wshadow',
+  '-Wstrict-prototypes',
+  '-Wtypedef-redefinition',
+  '-Wundef',
+  '-Wunknown-attributes',
+  '-fno-strict-aliasing',
+])
+
+if cc.has_argument('-Wimplicit-fallthrough')
+  if cc.compiles('''
+                 int main(int argc, char **argv) {
+                     int r = 0;
+                     switch (argc) {
+                     case 0:
+                         r++;
+                         /* fall-through */
+                     case 1:
+                         r++;
+                         break;
+                     }
+                     return r;
+                 }
+                 ''',
+                 args: '-Werror=implicit-fallthrough',
+                 name: '-Werror=implicit-fallthrough')
+    common_flags += '-Wimplicit-fallthrough'
   endif
-
 endif
 
 add_project_arguments(common_flags, language: 'c')
@@ -253,9 +250,10 @@ libudev_dep = dependency('libudev', version: '>= 175')
 dbus_dep = dependency('dbus-1', version: '>= 1.1')
 libndp_dep = dependency('libndp')
 
-jansson_dep = dependency('jansson', version: '>= 2.5', required: false)
+jansson_dep = dependency('jansson', version: '>= 2.7', required: false)
 config_h.set10('WITH_JANSSON', jansson_dep.found())
 
+jansson_msg = 'no'
 if jansson_dep.found()
   jansson_libdir = jansson_dep.get_pkgconfig_variable('libdir')
   res = run_command(find_program('eu-readelf', 'readelf'), '-d', join_paths(jansson_libdir, 'libjansson.so'))
@@ -267,6 +265,7 @@ if jansson_dep.found()
   endforeach
   assert(jansson_soname != '', 'Unable to determine Jansson SONAME')
   config_h.set_quoted('JANSSON_SONAME', jansson_soname)
+  jansson_msg = 'yes (soname: ' + jansson_soname + ')'
 endif
 
 libsystemd_dep = dependency('libsystemd', version: '>= 209', required: false)
@@ -497,12 +496,6 @@ if enable_teamdctl
   assert(libteamdctl_dep.found(), 'You must have libteamdctl installed to build. Use -Dteamdctl=false to disable it')
 endif
 
-enable_json_validation = get_option('json_validation')
-if enable_json_validation
-  assert(jansson_dep.found(), 'jansson is needed for team configuration validation. Use -Djson_validation=false to disable it')
-endif
-config_h.set10('WITH_JSON_VALIDATION', enable_json_validation)
-
 # polkit
 enable_polkit = get_option('polkit')
 if enable_polkit
@@ -754,6 +747,13 @@ if enable_nm_cloud_setup
 endif
 
 more_asserts = get_option('more_asserts')
+if more_asserts == 'auto'
+  if nm_minor_version % 2 == 0
+    more_asserts = 'no'
+  else
+    more_asserts = 'all'
+  endif
+endif
 if more_asserts == 'no'
   more_asserts = 0
 elif more_asserts == 'all'
@@ -1013,6 +1013,7 @@ if enable_ppp
   output += ' ' + pppd_path + ' plugins:' + pppd_plugin_dir
 endif
 output += '\n'
+output += '  jansson: ' + jansson_msg + '\n'
 output += '  modemmanager-1: ' + enable_modem_manager.to_string() + '\n'
 output += '  ofono: ' + enable_ofono.to_string() + '\n'
 output += '  concheck: ' + enable_concheck.to_string() + '\n'
@@ -1047,7 +1048,6 @@ output += '\n'
 output += '  code coverage: ' + get_option('b_coverage').to_string() + '\n'
 output += '  LTO: ' + enable_lto.to_string() + '\n'
 output += '  Linker garbage collection: ' + enable_ld_gc.to_string() + '\n'
-output += '  JSON validation for libnm: ' + enable_json_validation.to_string() + '\n'
 output += '  crypto: ' + crypto + '\n'
 output += '  sanitizers: ' + get_option('b_sanitize') + '\n'
 output += '  Mozilla Public Suffix List: ' + enable_libpsl.to_string() + '\n'