[vlc-commits] [Git][videolan/vlc][master] meson: fix dcomp.h detection

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Feb 28 10:07:14 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
f8cd81e4 by Pierre Lamot at 2023-02-28T09:39:43+00:00
meson: fix dcomp.h detection

dcomp.h is not a valid C header

- - - - -


1 changed file:

- meson.build


Changes:

=====================================
meson.build
=====================================
@@ -200,7 +200,7 @@ endif
 # Check for headers
 #
 
-check_headers = [
+check_c_headers = [
     ['arpa/inet.h'],
     ['threads.h'],
     ['netinet/tcp.h'],
@@ -224,14 +224,19 @@ check_headers = [
     ['X11/Xlib.h'],
     ['xlocale.h'],
     ['zlib.h'],
-    ['dcomp.h'],
     ['wordexp.h'],
     ['GL/wglew.h',
         { 'prefix' : ['#include <windows.h>', '#include <GL/glew.h>'],
           'args' : [contrib_inc_args] }],
 ]
 
-foreach header : check_headers
+check_cpp_headers = [
+    ['dcomp.h',
+        { 'prefix' : ['#include <windows.h>'],
+          'args' : [contrib_inc_args]}],
+]
+
+foreach header : check_c_headers
     header_kwargs = header.get(1, {})
     # TODO: Once we require meson 1.0, drop the array join here
     # See: https://github.com/mesonbuild/meson/pull/11099
@@ -242,6 +247,17 @@ foreach header : check_headers
     endif
 endforeach
 
+foreach header : check_cpp_headers
+    header_kwargs = header.get(1, {})
+    # TODO: Once we require meson 1.0, drop the array join here
+    # See: https://github.com/mesonbuild/meson/pull/11099
+    if cpp.check_header(header[0],
+                       prefix: '\n'.join(header_kwargs.get('prefix', [])),
+                       args: header_kwargs.get('args', []))
+        cdata.set('HAVE_' + header[0].underscorify().to_upper(), 1)
+    endif
+endforeach
+
 
 #
 # Darwin specific checks



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f8cd81e4f59ca91c6ca959390e29154141a25b56

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f8cd81e4f59ca91c6ca959390e29154141a25b56
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list