diff options
author | Eric Engestrom | 2018-02-07 08:20:52 -0600 |
---|---|---|
committer | Eric Engestrom | 2018-03-09 11:12:02 -0600 |
commit | 5236de6cc1ee3759567e0fd8cd6260386b8d5b7e (patch) | |
tree | f7dea5ac7e775bb6114cb8b5de74f4e4e30ee2c8 | |
parent | a5329cd990cd1b85e2755f708fd9e48ac06b99a7 (diff) | |
download | external-libgbm-5236de6cc1ee3759567e0fd8cd6260386b8d5b7e.tar.gz external-libgbm-5236de6cc1ee3759567e0fd8cd6260386b8d5b7e.tar.xz external-libgbm-5236de6cc1ee3759567e0fd8cd6260386b8d5b7e.zip |
meson: use pkg-config to detect libatomic_ops
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-rw-r--r-- | amdgpu/meson.build | 2 | ||||
-rw-r--r-- | etnaviv/meson.build | 2 | ||||
-rw-r--r-- | freedreno/meson.build | 2 | ||||
-rw-r--r-- | intel/meson.build | 2 | ||||
-rw-r--r-- | meson.build | 4 | ||||
-rw-r--r-- | nouveau/meson.build | 2 | ||||
-rw-r--r-- | omap/meson.build | 2 | ||||
-rw-r--r-- | radeon/meson.build | 2 | ||||
-rw-r--r-- | tegra/meson.build | 2 |
9 files changed, 11 insertions, 9 deletions
diff --git a/amdgpu/meson.build b/amdgpu/meson.build index 518b8504..f39d7bf6 100644 --- a/amdgpu/meson.build +++ b/amdgpu/meson.build | |||
@@ -37,7 +37,7 @@ libdrm_amdgpu = shared_library( | |||
37 | ], | 37 | ], |
38 | include_directories : [inc_root, inc_drm], | 38 | include_directories : [inc_root, inc_drm], |
39 | link_with : libdrm, | 39 | link_with : libdrm, |
40 | dependencies : dep_pthread_stubs, | 40 | dependencies : [dep_pthread_stubs, dep_atomic_ops], |
41 | version : '1.0.0', | 41 | version : '1.0.0', |
42 | install : true, | 42 | install : true, |
43 | ) | 43 | ) |
diff --git a/etnaviv/meson.build b/etnaviv/meson.build index 1767733b..ca2aa544 100644 --- a/etnaviv/meson.build +++ b/etnaviv/meson.build | |||
@@ -31,7 +31,7 @@ libdrm_etnaviv = shared_library( | |||
31 | include_directories : [inc_root, inc_drm], | 31 | include_directories : [inc_root, inc_drm], |
32 | link_with : libdrm, | 32 | link_with : libdrm, |
33 | c_args : warn_c_args, | 33 | c_args : warn_c_args, |
34 | dependencies : [dep_pthread_stubs, dep_rt], | 34 | dependencies : [dep_pthread_stubs, dep_rt, dep_atomic_ops], |
35 | version : '1.0.0', | 35 | version : '1.0.0', |
36 | install : true, | 36 | install : true, |
37 | ) | 37 | ) |
diff --git a/freedreno/meson.build b/freedreno/meson.build index 741b3b6a..015b7fb1 100644 --- a/freedreno/meson.build +++ b/freedreno/meson.build | |||
@@ -44,7 +44,7 @@ libdrm_freedreno = shared_library( | |||
44 | [files_freedreno, config_file], | 44 | [files_freedreno, config_file], |
45 | c_args : warn_c_args, | 45 | c_args : warn_c_args, |
46 | include_directories : [inc_root, inc_drm], | 46 | include_directories : [inc_root, inc_drm], |
47 | dependencies : [dep_valgrind, dep_pthread_stubs, dep_rt], | 47 | dependencies : [dep_valgrind, dep_pthread_stubs, dep_rt, dep_atomic_ops], |
48 | link_with : libdrm, | 48 | link_with : libdrm, |
49 | version : '1.0.0', | 49 | version : '1.0.0', |
50 | install : true, | 50 | install : true, |
diff --git a/intel/meson.build b/intel/meson.build index aa5a1349..53c7fce4 100644 --- a/intel/meson.build +++ b/intel/meson.build | |||
@@ -29,7 +29,7 @@ libdrm_intel = shared_library( | |||
29 | ], | 29 | ], |
30 | include_directories : [inc_root, inc_drm], | 30 | include_directories : [inc_root, inc_drm], |
31 | link_with : libdrm, | 31 | link_with : libdrm, |
32 | dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind], | 32 | dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind, dep_atomic_ops], |
33 | c_args : warn_c_args, | 33 | c_args : warn_c_args, |
34 | version : '1.0.0', | 34 | version : '1.0.0', |
35 | install : true, | 35 | install : true, |
diff --git a/meson.build b/meson.build index c803f709..df6f2bd2 100644 --- a/meson.build +++ b/meson.build | |||
@@ -48,6 +48,7 @@ cc = meson.get_compiler('c') | |||
48 | intel_atomics = false | 48 | intel_atomics = false |
49 | lib_atomics = false | 49 | lib_atomics = false |
50 | 50 | ||
51 | dep_atomic_ops = dependency('atomic_ops', required : false) | ||
51 | if cc.compiles(''' | 52 | if cc.compiles(''' |
52 | int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); } | 53 | int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); } |
53 | int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); } | 54 | int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); } |
@@ -55,7 +56,8 @@ if cc.compiles(''' | |||
55 | name : 'Intel Atomics') | 56 | name : 'Intel Atomics') |
56 | intel_atomics = true | 57 | intel_atomics = true |
57 | with_atomics = true | 58 | with_atomics = true |
58 | elif cc.has_header('atomic_ops.h') | 59 | dep_atomic_ops = [] |
60 | elif dep_atomic_ops.found() | ||
59 | lib_atomics = true | 61 | lib_atomics = true |
60 | with_atomics = true | 62 | with_atomics = true |
61 | elif cc.has_function('atomic_cas_uint') | 63 | elif cc.has_function('atomic_cas_uint') |
diff --git a/nouveau/meson.build b/nouveau/meson.build index 80a8678c..51c9a712 100644 --- a/nouveau/meson.build +++ b/nouveau/meson.build | |||
@@ -25,7 +25,7 @@ libdrm_nouveau = shared_library( | |||
25 | c_args : warn_c_args, | 25 | c_args : warn_c_args, |
26 | include_directories : [inc_root, inc_drm], | 26 | include_directories : [inc_root, inc_drm], |
27 | link_with : libdrm, | 27 | link_with : libdrm, |
28 | dependencies : dep_threads, | 28 | dependencies : [dep_threads, dep_atomic_ops], |
29 | version : '2.0.0', | 29 | version : '2.0.0', |
30 | install : true, | 30 | install : true, |
31 | ) | 31 | ) |
diff --git a/omap/meson.build b/omap/meson.build index 8adb2213..e57b8f5d 100644 --- a/omap/meson.build +++ b/omap/meson.build | |||
@@ -24,7 +24,7 @@ libdrm_omap = shared_library( | |||
24 | include_directories : [inc_root, inc_drm], | 24 | include_directories : [inc_root, inc_drm], |
25 | c_args : warn_c_args, | 25 | c_args : warn_c_args, |
26 | link_with : libdrm, | 26 | link_with : libdrm, |
27 | dependencies : [dep_pthread_stubs], | 27 | dependencies : [dep_pthread_stubs, dep_atomic_ops], |
28 | version : '1.0.0', | 28 | version : '1.0.0', |
29 | install : true, | 29 | install : true, |
30 | ) | 30 | ) |
diff --git a/radeon/meson.build b/radeon/meson.build index a4171b41..b08c7442 100644 --- a/radeon/meson.build +++ b/radeon/meson.build | |||
@@ -31,7 +31,7 @@ libdrm_radeon = shared_library( | |||
31 | c_args : warn_c_args, | 31 | c_args : warn_c_args, |
32 | include_directories : [inc_root, inc_drm], | 32 | include_directories : [inc_root, inc_drm], |
33 | link_with : libdrm, | 33 | link_with : libdrm, |
34 | dependencies : [dep_pthread_stubs], | 34 | dependencies : [dep_pthread_stubs, dep_atomic_ops], |
35 | version : '1.0.1', | 35 | version : '1.0.1', |
36 | install : true, | 36 | install : true, |
37 | ) | 37 | ) |
diff --git a/tegra/meson.build b/tegra/meson.build index 7c671cd5..1f5c74b3 100644 --- a/tegra/meson.build +++ b/tegra/meson.build | |||
@@ -23,7 +23,7 @@ libdrm_tegra = shared_library( | |||
23 | [files('tegra.c'), config_file], | 23 | [files('tegra.c'), config_file], |
24 | include_directories : [inc_root, inc_drm], | 24 | include_directories : [inc_root, inc_drm], |
25 | link_with : libdrm, | 25 | link_with : libdrm, |
26 | dependencies : [dep_pthread_stubs], | 26 | dependencies : [dep_pthread_stubs, dep_atomic_ops], |
27 | c_args : warn_c_args, | 27 | c_args : warn_c_args, |
28 | version : '0.0.0', | 28 | version : '0.0.0', |
29 | install : true, | 29 | install : true, |