OSDN Git Service
(root)
/
android-x86
/
external-libdrm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
xf86drm: generalize the device subsystem type parsing code
[android-x86/external-libdrm.git]
/
meson.build
diff --git
a/meson.build
b/meson.build
index
bc5cfc5
..
ddcb884
100644
(file)
--- a/
meson.build
+++ b/
meson.build
@@
-21,7
+21,7
@@
project(
'libdrm',
['c'],
project(
'libdrm',
['c'],
- version : '2.4.
99
',
+ version : '2.4.
100
',
license : 'MIT',
meson_version : '>= 0.43',
default_options : ['buildtype=debugoptimized', 'c_std=gnu99'],
license : 'MIT',
meson_version : '>= 0.43',
default_options : ['buildtype=debugoptimized', 'c_std=gnu99'],
@@
-44,14
+44,18
@@
dep_threads = dependency('threads')
cc = meson.get_compiler('c')
cc = meson.get_compiler('c')
+symbols_check = find_program('symbols-check.py')
+prog_nm = find_program('nm')
+
# Check for atomics
intel_atomics = false
lib_atomics = false
dep_atomic_ops = dependency('atomic_ops', required : false)
# Check for atomics
intel_atomics = false
lib_atomics = false
dep_atomic_ops = dependency('atomic_ops', required : false)
-if cc.
compile
s('''
+if cc.
link
s('''
int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); }
int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); }
int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); }
int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); }
+ int main() { }
''',
name : 'Intel Atomics')
intel_atomics = true
''',
name : 'Intel Atomics')
intel_atomics = true
@@
-179,13
+183,21
@@
else
dep_rt = []
endif
dep_m = cc.find_library('m', required : false)
dep_rt = []
endif
dep_m = cc.find_library('m', required : false)
+# From Niclas Zeising:
+# FreeBSD requires sys/types.h for sys/sysctl.h, add it as part of the
+# includes when checking for headers.
foreach header : ['sys/sysctl.h', 'sys/select.h', 'alloca.h']
foreach header : ['sys/sysctl.h', 'sys/select.h', 'alloca.h']
- config.set('HAVE_' + header.underscorify().to_upper(),
- cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header)))
+ config.set
10
('HAVE_' + header.underscorify().to_upper(),
+ cc.compiles('#include <
sys/types.h>\n#include <
@0@>'.format(header), name : '@0@ works'.format(header)))
endforeach
endforeach
-if cc.has_header_symbol('sys/sysmacros.h', 'major')
+if (cc.has_header_symbol('sys/sysmacros.h', 'major') and
+ cc.has_header_symbol('sys/sysmacros.h', 'minor') and
+ cc.has_header_symbol('sys/sysmacros.h', 'makedev'))
config.set10('MAJOR_IN_SYSMACROS', true)
config.set10('MAJOR_IN_SYSMACROS', true)
-elif cc.has_header_symbol('sys/mkdev.h', 'major')
+endif
+if (cc.has_header_symbol('sys/mkdev.h', 'major') and
+ cc.has_header_symbol('sys/mkdev.h', 'minor') and
+ cc.has_header_symbol('sys/mkdev.h', 'makedev'))
config.set10('MAJOR_IN_MKDEV', true)
endif
config.set10('HAVE_OPEN_MEMSTREAM', cc.has_function('open_memstream'))
config.set10('MAJOR_IN_MKDEV', true)
endif
config.set10('HAVE_OPEN_MEMSTREAM', cc.has_function('open_memstream'))
@@
-217,7
+229,6
@@
libdrm_c_args = warn_c_args + ['-fvisibility=hidden']
dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel)
dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel)
dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
-dep_json = dependency('json-c', version : '>= 0.10.1', required : false)
_cairo_tests = get_option('cairo-tests')
if _cairo_tests != 'false'
dep_cairo = dependency('cairo', required : _cairo_tests == 'true')
_cairo_tests = get_option('cairo-tests')
if _cairo_tests != 'false'
dep_cairo = dependency('cairo', required : _cairo_tests == 'true')
@@
-249,9
+260,6
@@
if prog_xslt.found()
endif
with_man_pages = with_man_pages != 'false' and prog_xslt.found() and prog_sed.found()
endif
with_man_pages = with_man_pages != 'false' and prog_xslt.found() and prog_sed.found()
-# Used for tets
-prog_bash = find_program('bash')
-
config.set10('HAVE_VISIBILITY',
cc.compiles('''int foo_hidden(void) __attribute__((visibility(("hidden"))));''',
name : 'compiler supports __attribute__(("hidden"))'))
config.set10('HAVE_VISIBILITY',
cc.compiles('''int foo_hidden(void) __attribute__((visibility(("hidden"))));''',
name : 'compiler supports __attribute__(("hidden"))'))
@@
-277,7
+285,7
@@
config_file = configure_file(
configuration : config,
output : 'config.h',
)
configuration : config,
output : 'config.h',
)
-add_project_arguments('-include', '
config.h'
, language : 'c')
+add_project_arguments('-include', '
@0@'.format(config_file)
, language : 'c')
inc_root = include_directories('.')
inc_drm = include_directories('include/drm')
inc_root = include_directories('.')
inc_drm = include_directories('include/drm')
@@
-297,6
+305,16
@@
libdrm = shared_library(
install : true,
)
install : true,
)
+test(
+ 'core-symbols-check',
+ symbols_check,
+ args : [
+ '--lib', libdrm,
+ '--symbols-file', files('core-symbols.txt'),
+ '--nm', prog_nm.path(),
+ ],
+)
+
ext_libdrm = declare_dependency(
link_with : libdrm,
include_directories : [inc_root, inc_drm],
ext_libdrm = declare_dependency(
link_with : libdrm,
include_directories : [inc_root, inc_drm],
@@
-327,9
+345,6
@@
pkg.generate(
description : 'Userspace interface to kernel DRM services',
)
description : 'Userspace interface to kernel DRM services',
)
-env_test = environment()
-env_test.set('NM', find_program('nm').path())
-
if with_libkms
subdir('libkms')
endif
if with_libkms
subdir('libkms')
endif