Make Basilisk's configure.ac's SDL detection logic match SS's.

This commit is contained in:
Alexei Svitkine 2017-12-02 15:34:18 -05:00
parent c18d6fa923
commit 0e8e0b51b7
1 changed files with 16 additions and 7 deletions

View File

@ -300,13 +300,22 @@ if [[ "x$WANT_SDL" = "xyes" ]]; then
ac_cv_framework_SDL=no ac_cv_framework_SDL=no
fi fi
if [[ "x$ac_cv_framework_SDL" = "xno" ]]; then if [[ "x$ac_cv_framework_SDL" = "xno" ]]; then
PKG_CHECK_MODULES([sdl], [sdl >= 1.2], [ AC_PATH_PROG(sdl_config, "sdl-config")
CFLAGS="$CFLAGS $sdl_CFLAGS" if [[ -n "$sdl_config" ]]; then
CXXFLAGS="$CXXFLAGS $sdl_CFLAGS" sdl_cflags=`$sdl_config --cflags`
LIBS="$LIBS $sdl_LIBS" if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then
], [ sdl_libs=`$sdl_config --static-libs`
WANT_SDL=no else
]) sdl_libs=`$sdl_config --libs`
fi
CFLAGS="$CFLAGS $sdl_cflags"
CXXFLAGS="$CXXFLAGS $sdl_cflags"
LIBS="$LIBS $sdl_libs"
else
WANT_SDL=no
WANT_SDL_VIDEO=no
WANT_SDL_AUDIO=no
fi
fi fi
SDL_SUPPORT=`echo "$SDL_SUPPORT" | sed -e "s/^ //"` SDL_SUPPORT=`echo "$SDL_SUPPORT" | sed -e "s/^ //"`
else else