diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-01 01:27:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-01 01:27:08 +0300 |
commit | 2d05f3c19c4844034fbe32ec5df6c6b46088e54c (patch) | |
tree | 2ce757661fc91bed3be1ddf4ffc11e6993fc954e | |
parent | af374aa2b2944749193af49cdca28532cf56fae2 (diff) | |
download | manaplus-2d05f3c19c4844034fbe32ec5df6c6b46088e54c.tar.gz manaplus-2d05f3c19c4844034fbe32ec5df6c6b46088e54c.tar.bz2 manaplus-2d05f3c19c4844034fbe32ec5df6c6b46088e54c.tar.xz manaplus-2d05f3c19c4844034fbe32ec5df6c6b46088e54c.zip |
fix SDL detection code in OpenBSD and probably other systems.
Thanks for Brian Callahan.
-rwxr-xr-x | configure.ac | 12 |
1 files changed, 8 insertions, 4 deletions
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/)])) |