summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2018-09-01 16:49:40 -0400
committerPatrick Griffis <tingping@tingping.se>2018-09-01 16:50:31 -0400
commitc7322f406c9574dd330cdd8425f9f7895aaf7e49 (patch)
treefa74d418654e0fd6776409a76994009901e8cd0e
parent18eae24acfedce4b5eab761edf23748642004ae3 (diff)
build: Silence some Meson warnings and bump requirement to 0.40.0
-rw-r--r--meson.build10
1 files changed, 8 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index c75805ab..9d2ae05b 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
 project('hexchat', 'c',
   version: '2.14.2',
-  meson_version: '>= 0.38.0',
+  meson_version: '>= 0.40.0',
   default_options: [
     'c_std=gnu89',
     'buildtype=debugoptimized',
@@ -136,7 +136,13 @@ test_ldflags = [
   '-Wl,--nxcompat',
 ]
 foreach ldflag : test_ldflags
-  if cc.has_argument(ldflag) and cc.links('int main (void) { return 0; }', args: ldflag)
+  if meson.version().version_compare('>= 0.46.0')
+    has_arg = cc.has_link_argument(ldflag)
+  else
+    has_arg = cc.has_argument(ldflag)
+  endif
+
+  if has_arg and cc.links('int main (void) { return 0; }', args: ldflag)
     global_ldflags += ldflag
   endif
 endforeach