Skip to content

Commit

Permalink
Fixed bug 4544 - SDL2.m4 SDL2.framework patch made it impossible to f…
Browse files Browse the repository at this point in the history
…ail 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/ad4968de54ec 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.
  • Loading branch information
slouken committed Mar 17, 2019
1 parent 8bc59f8 commit 55f18d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdl2.m4
Expand Up @@ -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"
Expand Down

0 comments on commit 55f18d3

Please sign in to comment.