-#!/bin/sh
-set -eu
-
-if [ "$(uname)" = "Darwin" ]
-then
- LIB=${1-.libs/libEGL.dylib}
-else
- LIB=${1-.libs/libEGL.so}
-fi
-
-if ! [ -f "$LIB" ]
-then
- exit 1
-fi
-
-FUNCS=$($NM -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do
-( grep -q "^$func$" || echo $func ) <<EOF
eglBindAPI
eglBindTexImage
eglChooseConfig
eglWaitSync
MesaGLInteropEGLQueryDeviceInfo
MesaGLInteropEGLExportObject
-_fini
-_init
-EOF
-done)
-
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
if with_glvnd
# TODO: add glvnd symbol check
else
- test('egl-symbols-check',
- find_program('egl-symbols-check'),
- env : env_test,
- args : libegl,
- suite : ['egl'],
- )
+ egl_symbols = files('egl-symbols.txt')
endif
+ test('egl-symbols-check',
+ symbols_check,
+ args : [
+ '--lib', libegl,
+ '--symbols-file', egl_symbols,
+ '--nm', prog_nm.path(),
+ ],
+ suite : ['egl'],
+ )
test('egl-entrypoint-check',
find_program('egl-entrypoint-check'),
env : ['srcdir=' + meson.current_source_dir()],