raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3a18900441e097eec4adf34c9f0836c8b5bbb01f

commit 3a18900441e097eec4adf34c9f0836c8b5bbb01f
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Wed Nov 7 15:57:37 2018 +0000

    meson build - fix build to check for environ like autofoo did
---
 meson.build | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

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 = []
 

-- 


Reply via email to