aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-07 15:57:37 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-09 11:43:59 +0000
commit3a18900441e097eec4adf34c9f0836c8b5bbb01f (patch)
treed3dbdb5c60ba6fc6aee5e4242a4f427836883f12 /meson.build
parentelm quicklaunch - warn - explicitly handle socket length being too long (diff)
downloadefl-3a18900441e097eec4adf34c9f0836c8b5bbb01f.tar.gz
meson build - fix build to check for environ like autofoo did
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build15
1 files changed, 15 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 39d98f1346..dcef2ea66d 100644
--- a/meson.build
+++ b/meson.build
@@ -96,6 +96,21 @@ config_h.set_quoted('BINDIR', dir_bin)
config_h.set_quoted('DATADIR', dir_data)
config_h.set10('EFL_HAVE_THREADS', true)
+## have to get compiler again for this to work
+compiler = meson.get_compiler('c')
+code = '''#define _GNU_SOURCE 1
+#include <unistd.h>
+#include <stdio.h>
+
+extern char **environ;
+
+void func(void) { printf("%p\n", environ); }
+'''
+if compiler.compiles(code, args : '-lc', name : 'environ check') == true
+ config_h.set10('HAVE_ENVIRON', true)
+endif
+
+
config_dir = [include_directories('.')]
eolian_include_directories = []