aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build15
1 files changed, 14 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 3a5452bf..743599eb 100644
--- a/meson.build
+++ b/meson.build
@@ -161,10 +161,23 @@ if compiler.has_function('mlock', prefix : '#include <sys/mman.h>')
conf_data.set('HAVE_MLOCK', 1)
endif
-if compiler.has_function('truncate', prefix : '#include <unistd.h>\n#include <sys/types.h>')
+if compiler.has_function('truncate', prefix : '''#include <unistd.h>
+ #include <sys/types.h>
+''')
conf_data.set('HAVE_TRUNCATE', 1)
endif
+code = '''#include <dirent.h>
+ void func() {
+ struct dirent d; d.d_type = DT_REG;
+ }
+'''
+if compiler.compiles(code, name : 'struct dirent has d_type member')
+ conf_data.set('HAVE_DIRENT_D_TYPE', 1)
+endif
+
+# FIXME: JPilot
+
configure_file(output : 'config.h',
configuration : conf_data)