summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2019-03-16 18:45:10 -0700
committerSam Lantinga <slouken@libsdl.org>2019-03-16 18:45:10 -0700
commit5787e90a328bd1fd849c39ec9cd49d9bb3a67e6f (patch)
tree8fb657b4c07c0ef4c5add323f68551feeab74993
parent11698a92aed0c4f52897fb414a2d948a93b1eb3b (diff)
Fixed bug 4544 - SDL2.m4 SDL2.framework patch made it impossible to fail detection
Stian Skjelstad check if $sdl_framework is set, before checking if directory exists Patch that was merged here https://hg.libsdl.org/SDL/rev/9befd0acb9ef made it impossible for the SDL2 detection to fail, since one of the if statements fails to check if a variable is set or not. if test -d $sdl_framework; then can evaluate to true in some shells. I guess it falls into undefined behaviour when looking at the POSIX standard.
-rw-r--r--sdl2.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/sdl2.m4 b/sdl2.m4
index b915f99ede..0a73bc7d47 100644
--- a/sdl2.m4
+++ b/sdl2.m4
@@ -74,7 +74,7 @@ AC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])
done
fi
- if test -d $sdl_framework; then
+ if test x"$sdl_framework" != x && test -d "$sdl_framework"; then
AC_MSG_RESULT($sdl_framework)
sdl_framework_dir=`dirname $sdl_framework`
SDL_CFLAGS="-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include"