Skip to content

Commit 97e20d6

Browse files
committedNov 30, 2024·
Update sdl2.m4 from upstream
1 parent 557b8fb commit 97e20d6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
 

‎m4/sdl2.m4

+7-6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
# * also look for SDL2.framework under Mac OS X
1010
# * removed HP/UX 9 support.
1111
# * updated for newer autoconf.
12+
# * (v3) use $PKG_CONFIG for pkg-config cross-compiling support
1213

13-
# serial 2
14+
# serial 3
1415

1516
dnl AM_PATH_SDL2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1617
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
@@ -24,7 +25,7 @@ AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed
2425
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
2526
sdl_exec_prefix="$withval", sdl_exec_prefix="")
2627
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
27-
, enable_sdltest=yes)
28+
, enable_sdltest=yes)
2829
AC_ARG_ENABLE(sdlframework, [ --disable-sdlframework Do not search for SDL2.framework],
2930
, search_sdl_framework=yes)
3031
@@ -54,7 +55,7 @@ AC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])
5455
5556
if test "x$sdl_pc" = xyes ; then
5657
no_sdl=""
57-
SDL2_CONFIG="pkg-config sdl2"
58+
SDL2_CONFIG="$PKG_CONFIG sdl2"
5859
else
5960
as_save_PATH="$PATH"
6061
if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then
@@ -70,8 +71,8 @@ AC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])
7071
sdl_framework=$SDL2_FRAMEWORK
7172
else
7273
for d in / ~/ /System/; do
73-
if test -d "$dLibrary/Frameworks/SDL2.framework"; then
74-
sdl_framework="$dLibrary/Frameworks/SDL2.framework"
74+
if test -d "${d}Library/Frameworks/SDL2.framework"; then
75+
sdl_framework="${d}Library/Frameworks/SDL2.framework"
7576
fi
7677
done
7778
fi
@@ -192,7 +193,7 @@ int main(int argc, char *argv[])
192193
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
193194
echo "*** to the installed location Also, make sure you have run ldconfig if that"
194195
echo "*** is required on your system"
195-
echo "***"
196+
echo "***"
196197
echo "*** If you have an old version installed, it is best to remove it, although"
197198
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
198199
[ echo "*** The test program failed to compile or link. See the file config.log for the"

0 commit comments

Comments
 (0)
Please sign in to comment.