meson: simplify GST_DISABLE_GST_DEBUG check some more
authorTim-Philipp Müller <tim@centricular.com>
Wed, 21 Feb 2018 19:42:19 +0000 (19:42 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 21 Feb 2018 19:42:19 +0000 (19:42 +0000)
meson.build

index 19837218ef8cd869e5ea6a35c0e305b0a3fe23e1..5687663e1f5d15892d3c82b950b7bb353419c6d7 100644 (file)
@@ -116,16 +116,12 @@ plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))
 if gst_dep.type_name() == 'internal'
   gst_debug_disabled = subproject('gstreamer').get_variable('disable_gst_debug')
 else
-    # We can't check that in the case of subprojects as we won't
+  # We can't check that in the case of subprojects as we won't
   # be able to build against an internal dependency (which is not built yet)
-  gst_debug_disabled = not cc.compiles('''#include <gst/gstconfig.h>
-                                          #ifdef GST_DISABLE_GST_DEBUG
-                                          #error "debugging disabled, make compiler fail"
-                                          #endif''', dependencies: gst_dep)
+  gst_debug_disabled = cc.has_header_symbol('gst/gstconfig.h', 'GST_DISABLE_GST_DEBUG', dependencies: gst_dep)
 endif
 
 if gst_debug_disabled and cc.has_argument('-Wno-unused')
-  message('GStreamer debug system is disabled')
   add_project_arguments('-Wno-unused', language: 'c')
 endif