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
49
50
51
52
53
54
55
56
57
58
59
60
|
From: Robert Schwebel <r.schwebel@pengutronix.de>
Subject: libtheora: fix configure.ac to work with cross scenario for sdl
This is https://trac.xiph.org/ticket/1466
The current test in configure.ac mixes up two different methods (hand
written plus pkg-config). This patch changes the mechanics towards
proper pkg-config usage. In return, we get a cleaned up cross scenario
with no build-system leakage.
This patch fixes the SDL test.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
configure.ac | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
Index: libtheora-1.0/configure.ac
===================================================================
--- libtheora-1.0.orig/configure.ac
+++ libtheora-1.0/configure.ac
@@ -312,13 +312,32 @@ if test "${HAVE_VORBIS}" = "yes"; then
AC_SUBST(VORBIS_LIBS)
fi
+
dnl check for SDL
-HAVE_SDL=no
+AC_MSG_CHECKING([for sdl])
+AC_ARG_ENABLE(sdl,
+ AS_HELP_STRING([--enable-sdl], [enable SDL @<:@default=yes@:>@]),
+ [case "$enableval" in
+ y | yes) HAVE_SDL=yes ;;
+ *) HAVE_SDL=no ;;
+ esac],
+ [HAVE_SDL=yes])
+AC_MSG_RESULT([${HAVE_SDL}])
+AM_CONDITIONAL(HAVE_SDL, [test "$HAVE_SDL" = "yes"])
+if test "${HAVE_SDL}" = "yes"; then
+ AC_DEFINE(HAVE_SDL, 1, [sdl])
+
+ REQUIRES_SDL="sdl >= 1.2.13"
+ AC_SUBST(REQUIRES_SDL)
+ PKG_CHECK_MODULES([SDL],
+ [${REQUIRES_SDL}],
+ [],
+ [AC_MSG_ERROR([*** ${REQUIRES_SDL} not found by pkg-config on your system])]
+ )
+ AC_SUBST(SDL_CFLAGS)
+ AC_SUBST(SDL_LIBS)
+fi
-AM_PATH_SDL(,[
- HAVE_SDL=yes
- SDL_LIBS=`$SDL_CONFIG --libs`
-],AC_MSG_WARN([*** Unable to find SDL -- Not compiling example players ***]))
dnl check for OSS
HAVE_OSS=no
|