summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-09-14 02:42:20 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-09-14 02:42:20 +0000
commitfbaadd72fc8047fdb076af855a917f132d3d5910 (patch)
tree7343a98029235a53371949039160d79ad3fb8a4e /configure.ac
parent2bc6101915f78716c7bbc49f6ec4633bf5502d4f (diff)
downloadxine-lib-fbaadd72fc8047fdb076af855a917f132d3d5910.tar.gz
xine-lib-fbaadd72fc8047fdb076af855a917f132d3d5910.tar.bz2
Do the same for SDL: use pkg-config rather than the m4 test.
CVS patchset: 8248 CVS date: 2006/09/14 02:42:20
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 14 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index be4b35594..4f71227ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -958,19 +958,22 @@ dnl ---------------------------------------------
dnl check for SDL
dnl ---------------------------------------------
-AC_ARG_ENABLE([sdl],
- AC_HELP_STRING([--disable-sdl], [do not build SDL support]),
- [with_sdl=$enableval], [with_sdl=yes])
-
-if test "x$with_sdl" = "xyes"; then
- AM_PATH_SDL(1.1.5,
- AC_DEFINE(HAVE_SDL,1,[Define this if you have SDL library installed]),
- [])
-else
- no_sdl=yes
+AC_ARG_WITH([sdl],
+ AS_HELP_STRING([--without-sdl], [Build without SDL output]))
+
+if test "x$with_sdl" != "xno"; then
+ PKG_CHECK_MODULES([SDL], [sdl], [have_sdl=yes], [have_sdl=no])
+ if test "x$with_sdl" = "xyes" && test "x$have_sdl" = "xno"; then
+ AC_MSG_ERROR([SDL support requested, but SDL not found])
+ elif test "x$have_sdl" = "xyes"; then
+ AC_DEFINE([HAVE_SDL], [1], [Define this if you have SDL installed])
+ fi
fi
-AM_CONDITIONAL(HAVE_SDL, [test x"$no_sdl" != x"yes"])
+AM_CONDITIONAL([HAVE_SDL], [test "x$have_sdl" = "xyes"])
+
+AC_SUBST([SDL_CFLAGS])
+AC_SUBST([SDL_LIBS])
dnl ---------------------------------------------
dnl check for Libstk