Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Lhomme <slhomme@videolan.org>2018-09-28 15:30:57 +0300
committerJean-Baptiste Kempf <jb@videolan.org>2018-09-28 19:07:28 +0300
commitd6e9cb0603817437aea15849228255661e19b2b6 (patch)
tree710739100c6d6a435c387e8070135863c97a9641 /meson.build
parentce0f141e2da6bcb23ad999a6cac1ffe6abb27684 (diff)
build: use local getopt for anything system where it's missing
Do not force include the compat folder as it may contain headers that do exist for the compiler. Include the compat headers individually when they are needed and use an explicit path to compat/
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 9 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 1930531..693d1b3 100644
--- a/meson.build
+++ b/meson.build
@@ -44,7 +44,9 @@ else
thread_dependency = declare_dependency(sources: ['src/win32/thread.c'])
endif
-dav1d_inc_dirs = include_directories(['include', 'include/dav1d'])
+if cc.has_function('getopt_long', prefix : '#include <getopt.h>')
+ cdata.set('HAVE_GETOPT_H',1)
+endif
#
# Option handling
@@ -170,6 +172,11 @@ cdata.set10('HAVE_ASM', is_asm_enabled)
#
# Generate config headers
#
+if cdata.has('HAVE_GETOPT_H')
+ dav1d_inc_dirs = include_directories(['include', 'include/dav1d'])
+else
+ dav1d_inc_dirs = include_directories(['include', 'include/dav1d', 'include/compat'])
+endif
config_h_target = configure_file(output: 'config.h', configuration: cdata)
@@ -331,7 +338,7 @@ dav1d_sources = files(
'tools/output/yuv.c'
)
-if cc.get_id() == 'msvc'
+if not cdata.has('HAVE_GETOPT_H')
dav1d_sources += files('tools/compat/getopt.c')
endif