From 2d05f3c19c4844034fbe32ec5df6c6b46088e54c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 1 Sep 2013 01:27:08 +0300 Subject: fix SDL detection code in OpenBSD and probably other systems. Thanks for Brian Callahan. --- configure.ac | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 56eca80c1..2858ba048 100755 --- a/configure.ac +++ b/configure.ac @@ -44,6 +44,10 @@ AM_GNU_GETTEXT_VERSION([0.16.1]) AC_ARG_WITH(sdl2,[ --with-sdl enable experimental SDL 2 support] ) if test "x$with_sdl2" == "xyes"; then AC_PATH_PROG(SDL_CONFIG, sdl2-config) + if test -n "$SDL_CONFIG"; then + LIBS="$LIBS `$SDL_CONFIG --libs`" + CPPFLAGS="$CPPFLAGS `$SDL_CONFIG --cflags`" + fi AC_CHECK_LIB([SDL2], [SDL_Init], , AC_MSG_ERROR([ *** Unable to find SDL2 library (http://www.libsdl.org/)])) @@ -71,6 +75,10 @@ if test "x$with_sdl2" == "xyes"; then with_sdl2=yes else AC_PATH_PROG(SDL_CONFIG, sdl-config) + if test -n "$SDL_CONFIG"; then + LIBS="$LIBS `$SDL_CONFIG --libs`" + CPPFLAGS="$CPPFLAGS `$SDL_CONFIG --cflags`" + fi AC_CHECK_LIB([SDL], [SDL_Init], , AC_MSG_ERROR([ *** Unable to find SDL library (http://www.libsdl.org/)])) @@ -114,10 +122,6 @@ else fi -if test -n "$SDL_CONFIG"; then - LIBS="$LIBS `$SDL_CONFIG --libs`" - CPPFLAGS="$CPPFLAGS `$SDL_CONFIG --cflags`" -fi AC_CHECK_HEADERS([SDL.h], , AC_MSG_ERROR([ *** SDL library found but cannot find headers (http://www.libsdl.org/)])) -- cgit v1.2.3-60-g2f50