9
9
# * also look for SDL2.framework under Mac OS X
10
10
# * removed HP/UX 9 support.
11
11
# * updated for newer autoconf.
12
+ # * (v3) use $PKG_CONFIG for pkg-config cross-compiling support
12
13
13
- # serial 2
14
+ # serial 3
14
15
15
16
dnl AM_PATH_SDL2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
16
17
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
24
25
AC_ARG_WITH ( sdl-exec-prefix ,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)] ,
25
26
sdl_exec_prefix="$withval" , sdl_exec_prefix="" )
26
27
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 )
28
29
AC_ARG_ENABLE ( sdlframework , [ --disable-sdlframework Do not search for SDL2.framework] ,
29
30
, search_sdl_framework=yes )
30
31
@@ -54,7 +55,7 @@ AC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])
54
55
55
56
if test "x$sdl_pc" = xyes ; then
56
57
no_sdl=""
57
- SDL2_CONFIG="pkg-config sdl2"
58
+ SDL2_CONFIG="$PKG_CONFIG sdl2"
58
59
else
59
60
as_save_PATH="$PATH"
60
61
if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then
@@ -70,8 +71,8 @@ AC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])
70
71
sdl_framework=$SDL2_FRAMEWORK
71
72
else
72
73
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"
75
76
fi
76
77
done
77
78
fi
@@ -192,7 +193,7 @@ int main(int argc, char *argv[])
192
193
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
193
194
echo "*** to the installed location Also, make sure you have run ldconfig if that"
194
195
echo "*** is required on your system"
195
- echo "***"
196
+ echo "***"
196
197
echo "*** If you have an old version installed, it is best to remove it, although"
197
198
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"] ,
198
199
[ echo "*** The test program failed to compile or link. See the file config.log for the"
0 commit comments