Meson: Change extra-checks to feature option and make it yielding
[platform/upstream/gstreamer.git] / meson.build
index f2386de..60d844f 100644 (file)
@@ -114,6 +114,8 @@ cdata.set_quoted('PLUGINDIR', join_paths(get_option('prefix'), get_option('libdi
 cdata.set_quoted('VERSION', gst_version)
 cdata.set_quoted('GST_PLUGIN_SCANNER_INSTALLED', join_paths(prefix, helpers_install_dir, 'gst-plugin-scanner'))
 cdata.set_quoted('GST_PTP_HELPER_INSTALLED', join_paths(prefix, helpers_install_dir, 'gst-ptp-helper'))
+cdata.set_quoted('GST_PLUGIN_SUBDIR', get_option('libdir'),
+  description: 'plugin directory path component, used to find plugins on relocatable builds on windows')
 cdata.set_quoted('GST_PLUGIN_SCANNER_SUBDIR', libexecdir,
   description: 'libexecdir path component, used to find plugin-scanner on relocatable builds on windows')
 cdata.set('GST_DISABLE_OPTION_PARSING', not get_option('option-parsing'))
@@ -199,6 +201,7 @@ check_headers = [
   'unistd.h',
   'valgrind/valgrind.h',
   'sys/resource.h',
+  'sys/uio.h',
 ]
 
 if host_system == 'windows'
@@ -227,6 +230,7 @@ check_functions = [
   'pselect',
   'getpagesize',
   'clock_gettime',
+  'strnlen',
   # These are needed by libcheck
   'getline',
   'mkstemp',
@@ -254,7 +258,7 @@ if cc.links('''#include <pthread.h>
   cdata.set('HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID', 1)
 endif
 
-# Check for posix timers and the monotonic clock
+# Check for posix timers and monotonic clock
 time_prefix = '#include <time.h>\n'
 if cdata.has('HAVE_UNISTD_H')
   time_prefix += '#include <unistd.h>'
@@ -432,7 +436,7 @@ test_deps = [gmp_dep, gsl_dep, gslcblas_dep]
 # Used by gstinfo.c
 dl_dep = cc.find_library('dl', required : false)
 cdata.set('HAVE_DLADDR', cc.has_function('dladdr', dependencies : dl_dep))
-cdata.set('GST_ENABLE_EXTRA_CHECKS', get_option('extra-checks'))
+cdata.set('GST_ENABLE_EXTRA_CHECKS', not get_option('extra-checks').disabled())
 cdata.set('USE_POISONING', get_option('poisoning'))
 
 configinc = include_directories('.')
@@ -464,7 +468,7 @@ rt_lib = cc.find_library('rt', required : false)
 gir = find_program('g-ir-scanner', required : get_option('introspection'))
 gnome = import('gnome')
 
-build_gir = gir.found() and not meson.is_cross_build()
+build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
 
 gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
     'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \