summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-03-02 17:01:54 +0000
committerRoss Burton <ross.burton@intel.com>2018-03-12 12:02:08 +0000
commit1267f82021d58a447f5614ceef20509bea47bca3 (patch)
treea6d01bbb2ac7d28d98b7b4339f886dd2219b1aa4 /test
parenta35192b07cabc373e56eec6de2b9bd4fdd7bdee8 (diff)
downloadlibepoxy-1267f82021d58a447f5614ceef20509bea47bca3.tar.gz
meson: generalise build_apple to has_dlvsym
build_apple was introduced in 756dca as a proxy for the fact that Apple's libc doesn't have dlvsym(), which is glibc-specific so also isn't present in other libc implementations such as musl. Instead of detecting whether we are building for Apple or not, just probe the to see if we have dlvsym.
Diffstat (limited to 'test')
-rw-r--r--test/meson.build9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/meson.build b/test/meson.build
index c5788b4..62f2f3d 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,3 +1,6 @@
+dl_dep = cc.find_library('dl', required: false)
+has_dlvsym = cc.has_function('dlvsym', dependencies: dl_dep)
+
has_gles1 = gles1_dep.found()
has_gles2 = gles2_dep.found()
build_x11_tests = enable_x11 and x11_dep.found()
@@ -92,8 +95,8 @@ if build_glx
[ 'glx_has_extension_nocontext', [ 'glx_has_extension_nocontext.c' ], [], [], true ],
[ 'glx_static', [ 'glx_static.c' ], [ '-DNEEDS_TO_BE_STATIC'], [ '-static' ], libtype == 'static' ],
[ 'glx_shared_znow', [ 'glx_static.c', ], [], [ '-Wl,-z,now' ], has_znow ],
- [ 'glx_alias_prefer_same_name', [ 'glx_alias_prefer_same_name.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple ],
- [ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple ],
+ [ 'glx_alias_prefer_same_name', [ 'glx_alias_prefer_same_name.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], has_dlvsym ],
+ [ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], has_dlvsym ],
]
foreach test: glx_tests
@@ -114,7 +117,7 @@ if build_glx
endif
endforeach
- if not build_apple
+ if has_dlvsym
# GLX/EGL tests
if build_egl
glx_egl_sources = [