1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
--- pwlib-1.9.3/configure.ac.orig 2006-01-31 10:23:43.000000000 +0100
+++ pwlib-1.9.3/configure.ac 2006-02-16 00:42:27.000000000 +0100
@@ -1476,6 +1476,7 @@
AC_ARG_ENABLE(sdl,
[ --disable-sdl disable SDL support])
+
if test "${enable_sdl}z" = "z" ; then
enable_sdl=$default_sdl
fi
@@ -1485,6 +1486,9 @@
AC_MSG_NOTICE(SDL disabled)
AC_DEFINE(P_SDL, 0)
else
+ dnl check for sdl-config
+ AC_PATH_PROG([SDL_CONFIG], [sdl-config],, [$PATH:/usr/local/bin])
+
dnl SDL checks
if test "${SDLLIB:-unset}" = "unset" ; then
SDLLIB=SDL
@@ -1496,7 +1500,13 @@
if test "${X11LIBDIR:-unset}" == "unset" ; then
X11LIBDIR=/usr/X11R6/lib
fi
- AC_CHECK_LIB(SDL, SDL_CreateYUVOverlay, HAS_SDL=1, HAS_SDL=, -L${X11LIBDIR} -lpthread -lX11 -lXext)
+ if test "x${SDL_CONFIG}" = "x" ; then
+ SDL_LIBS="-L${X11LIBDIR} -lpthread -lX11 -lXext -laa"
+ else
+ SDL_LIBS="`${SDL_CONFIG} --libs`"
+ fi
+
+ AC_CHECK_LIB([SDL], [SDL_CreateYUVOverlay], [HAS_SDL=1], [HAS_SDL=], [$SDL_LIBS])
fi
dnl freeBSD SDL check
@@ -1516,7 +1526,11 @@
if test ${SDLLIBDIR:-unset} != "unset" ; then
LDFLAGS="$LDFLAGS -L${SDLLIBDIR}"
fi
- ENDLDLIBS="$ENDLDLIBS -l${SDLLIB}"
+ if test "x${SDL_CONFIG}" = "x" ; then
+ ENDLDLIBS="$ENDLDLIBS -l${SDLLIB}"
+ else
+ ENDLDLIBS="$ENDLDLIBS `${SDL_CONFIG} --libs`"
+ fi
fi
fi
AC_SUBST(HAS_SDL)
|