mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
Properly check if unistd.h is avalaible
And stop providing a meson.h.config as it is not needed (as meson dep has been bumped to 0.36)
This commit is contained in:
parent
9258b8ba53
commit
863f2c7bb1
3 changed files with 11 additions and 7 deletions
|
@ -1,3 +0,0 @@
|
|||
#mesondefine LIBAV_SOURCE
|
||||
#mesondefine PACKAGE_VERSION
|
||||
#mesondefine PACKAGE
|
|
@ -21,7 +21,9 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
#include "gstavutils.h"
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
|
13
meson.build
13
meson.build
|
@ -1,6 +1,6 @@
|
|||
project('gst-libav', 'c', 'cpp',
|
||||
version : '1.11.0.1',
|
||||
meson_version : '>= 0.33.0',
|
||||
meson_version : '>= 0.36.0',
|
||||
default_options : [ 'warning_level=1',
|
||||
'buildtype=debugoptimized' ])
|
||||
|
||||
|
@ -33,6 +33,13 @@ cdata = configuration_data()
|
|||
cdata.set('LIBAV_SOURCE', '"system install"')
|
||||
cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))
|
||||
cdata.set('PACKAGE', '"gst-libav"')
|
||||
check_headers = [['unistd.h', 'HAVE_UNISTD_H']]
|
||||
|
||||
foreach h : check_headers
|
||||
if cc.has_header(h.get(0))
|
||||
cdata.set(h.get(1), 1)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
|
||||
gst_dep = dependency('gstreamer-1.0', version : gst_req,
|
||||
|
@ -48,9 +55,7 @@ gstpbutils_dep = dependency('gstreamer-pbutils-1.0', version : gst_req,
|
|||
fallback : ['gst-plugins-base', 'pbutils_dep'])
|
||||
libm = cc.find_library('m', required : false)
|
||||
|
||||
configure_file(input : 'config.h.meson',
|
||||
output : 'config.h',
|
||||
configuration : cdata)
|
||||
configure_file(output : 'config.h', configuration : cdata)
|
||||
|
||||
gst_libav_args = ['-DHAVE_CONFIG_H', '-Wno-deprecated-declarations']
|
||||
configinc = include_directories('.')
|
||||
|
|
Loading…
Reference in a new issue