diff options
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/meson.build b/meson.build index 5bd55e6a..301ff204 100644 --- a/meson.build +++ b/meson.build @@ -1,16 +1,18 @@ +# SPDX-License-Identifier: LGPL-2.1+ + project( 'NetworkManager', 'c', # NOTE: When incrementing version also: # - add corresponding NM_VERSION_x_y_z macros in # "shared/nm-version-macros.h.in" # - update number in configure.ac - version: '1.22.10', + version: '1.23.90', license: 'GPL2+', default_options: [ 'buildtype=debugoptimized', 'c_std=gnu11', ], - meson_version: '>= 0.44.0', + meson_version: '>= 0.46.0', ) nm_name = meson.project_name() @@ -110,8 +112,18 @@ use_sys_random = cc.has_function('getrandom', prefix: '#include <sys/random.h>') config_h.set10('USE_SYS_RANDOM_H', use_sys_random) config_h.set10('HAVE_GETRANDOM', use_sys_random or cc.has_function('getrandom', prefix: '#include <linux/random.h>')) -# functions -# FIXME secure_getenv check is not useful? +config_h.set10('HAVE_PIDFD_OPEN', cc.has_function('pidfd_open', prefix: '''#include <stdlib.h> + #include <unistd.h> + #include <signal.h> + #include <sys/wait.h>''')) +config_h.set10('HAVE_PIDFD_SEND_SIGNAL', cc.has_function('pidfd_send_signal', prefix: '''#include <stdlib.h> + #include <unistd.h> + #include <signal.h> + #include <sys/wait.h>''')) +config_h.set10('HAVE_RT_SIGQUEUEINFO', cc.has_function('rt_sigqueueinfo', prefix: '''#include <stdlib.h> + #include <unistd.h> + #include <signal.h> + #include <sys/wait.h>''')) config_h.set('HAVE_SECURE_GETENV', cc.has_function('secure_getenv')) config_h.set('HAVE___SECURE_GETENV', cc.has_function('__secure_getenv')) config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '#include <malloc.h>')) @@ -127,10 +139,6 @@ config_h.set('SIZEOF_INO_T', cc.sizeof('ino_t', prefix : '#include <sys/types.h> config_h.set('SIZEOF_TIME_T', cc.sizeof('time_t', prefix : '#include <sys/time.h>')) config_h.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include <sys/resource.h>')) -if not cc.has_type('pid_t', prefix: '#include <sys/types.h>') - config_h.set('pid_t', 'int') -endif - # compiler flags common_flags = [] common_ldflags = [] @@ -144,10 +152,14 @@ if enable_ld_gc test_ldflags = ['-Wl,--gc-sections'] - foreach cflag: test_c_flags + test_ldflags + foreach cflag: test_c_flags assert(cc.has_argument(cflag), 'Unused symbol eviction requested but not supported. Use -Dld_gc=false to build without it.') endforeach + foreach ldflag: test_ldflags + assert(cc.has_link_argument(ldflag), 'Linker garbage collection requested but not supported. Use -Dld_gc=false to build without it.') + endforeach + common_flags += test_c_flags common_ldflags += test_ldflags endif @@ -188,6 +200,7 @@ if nm_debug '-Wno-missing-field-initializers', '-Wno-pragmas', '-Wno-sign-compare', + '-Wno-tautological-constant-out-of-range-compare', '-Wno-unknown-pragmas', '-Wno-unused-parameter', '-Wparentheses-equality', @@ -505,11 +518,12 @@ config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT', config_auth_polkit_def enable_modify_system = get_option('modify_system') -enable_polkit_agent = get_option('polkit_agent') -if enable_polkit_agent - polkit_agent_dep = dependency('polkit-agent-1', version: '>= 0.97') +polkit_agent_dep = dependency('polkit-agent-1', version: '>= 0.97', required : false) +if polkit_agent_dep.found() + config_h.set_quoted('POLKIT_PACKAGE_PREFIX', polkit_agent_dep.get_pkgconfig_variable('prefix')) +else + config_h.set_quoted('POLKIT_PACKAGE_PREFIX', '/usr') endif -config_h.set10('WITH_POLKIT_AGENT', enable_polkit_agent) crypto = get_option('crypto') @@ -982,7 +996,6 @@ if enable_polkit output += ' modify.system)' endif output += '\n' -output += ' polkit agent: ' + enable_polkit_agent.to_string() + '\n' output += ' selinux: ' + enable_selinux.to_string() + '\n' output += ' systemd-journald: ' + enable_systemd_journal.to_string() + ' (default: logging.backend=' + config_logging_backend_default + ')\n' output += ' hostname persist: ' + hostname_persist + '\n' |