mapi: Teach es{1,2}api/ABI-check shared library names on Cygwin
authorJon Turney <jon.turney@dronecode.org.uk>
Sat, 11 Nov 2017 14:48:10 +0000 (14:48 +0000)
committerJon Turney <jon.turney@dronecode.org.uk>
Fri, 24 Nov 2017 16:53:55 +0000 (16:53 +0000)
Ideally we'd be able to get the library filename from libtool, but that
doesn't seem to be a feature...

Use of ${uname} is presumably ok here as we won't be running 'make check' if
we are cross-compiling

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/mapi/es1api/ABI-check
src/mapi/es2api/ABI-check

index 0a867343c79a6b02fbedc442184ca7ed54336ed7..b9ae5efafd8f4bd863b1584af1d5470265ddc0cc 100755 (executable)
@@ -9,12 +9,17 @@ set -eu
 # or in extensions that are part of the ES 1.1 extension pack.
 # (see http://www.khronos.org/registry/gles/specs/1.1/opengles_spec_1_1_extension_pack.pdf)
 
-if [ $(uname) == "Darwin" ]
-then
+case "$(uname)" in
+Darwin)
   LIB=${1-es1api/.libs/libGLESv1_CM.dylib}
-else
+  ;;
+CYGWIN*)
+  LIB=${1-es1api/.libs/cygGLESv1_CM-1.dll}
+  ;;
+*)
   LIB=${1-es1api/.libs/libGLESv1_CM.so.1}
-fi
+  ;;
+esac
 
 if ! [ -f "$LIB" ]
 then
index 716e6679a49f2e38c06b8af85603b32a1f74fad2..7bc78480f767d4650bf33264d4bc3fb82c68c189 100755 (executable)
@@ -6,12 +6,17 @@ set -eu
 # GL_EXT_multi_draw_arrays
 # GL_OES_EGL_image
 
-if [ $(uname) == "Darwin" ]
-then
+case "$(uname)" in
+Darwin)
   LIB=${1-es2api/.libs/libGLESv2.dylib}
-else
+  ;;
+CYGWIN*)
+  LIB=${1-es2api/.libs/cygGLESv2-2.dll}
+  ;;
+*)
   LIB=${1-es2api/.libs/libGLESv2.so.2}
-fi
+  ;;
+esac
 
 if ! [ -f "$LIB" ]
 then