summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 6e68c3e3..3434dd7c 100644
--- a/meson.build
+++ b/meson.build
@@ -13,8 +13,17 @@ project('libcamera', 'c', 'cpp',
# generated from this too.
api_version = '0.1'
+cc = meson.get_compiler('c')
+config_h = configuration_data()
+
+if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix: '#define _GNU_SOURCE')
+ config_h.set('HAVE_SECURE_GETENV', 1)
+endif
+configure_file(output: 'config.h', configuration: config_h)
+
common_arguments = [
'-Wno-unused-parameter',
+ '-include', 'config.h',
]
c_arguments = common_arguments