From c0255f61476a509780d316801a6a3d54c2f362ec Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 31 Jan 2017 03:33:34 +0300 Subject: Use pkg_config for all SDL libs in configure. --- configure.ac | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/configure.ac b/configure.ac index 080bdf791..b1e65934b 100755 --- a/configure.ac +++ b/configure.ac @@ -137,6 +137,17 @@ if test "x$with_sdl2" == "xyes"; then LIBS="`$SDL_CONFIG --libs` $LIBS" CPPFLAGS="`$SDL_CONFIG --cflags` $CPPFLAGS" fi + LIBS="`$PKG_CONFIG --libs SDL2_gfx` $LIBS" + CPPFLAGS="`$PKG_CONFIG --cflags SDL2_gfx` $CPPFLAGS" + LIBS="`$PKG_CONFIG --libs SDL2_image` $LIBS" + CPPFLAGS="`$PKG_CONFIG --cflags SDL2_image` $CPPFLAGS" + LIBS="`$PKG_CONFIG --libs SDL2_mixer` $LIBS" + CPPFLAGS="`$PKG_CONFIG --cflags SDL2_mixer` $CPPFLAGS" + LIBS="`$PKG_CONFIG --libs SDL2_net` $LIBS" + CPPFLAGS="`$PKG_CONFIG --cflags SDL2_net` $CPPFLAGS" + LIBS="`$PKG_CONFIG --libs SDL2_ttf` $LIBS" + CPPFLAGS="`$PKG_CONFIG --cflags SDL2_ttf` $CPPFLAGS" + AC_CHECK_LIB([SDL2], [SDL_Init], , AC_MSG_ERROR([ *** Unable to find SDL2 library (http://www.libsdl.org/)])) @@ -160,6 +171,16 @@ else LIBS="`$SDL_CONFIG --libs` $LIBS" CPPFLAGS="`$SDL_CONFIG --cflags` $CPPFLAGS" fi + LIBS="`$PKG_CONFIG --libs SDL_gfx` $LIBS" + CPPFLAGS="`$PKG_CONFIG --cflags SDL_gfx` $CPPFLAGS" + LIBS="`$PKG_CONFIG --libs SDL_image` $LIBS" + CPPFLAGS="`$PKG_CONFIG --cflags SDL_image` $CPPFLAGS" + LIBS="`$PKG_CONFIG --libs SDL_mixer` $LIBS" + CPPFLAGS="`$PKG_CONFIG --cflags SDL_mixer` $CPPFLAGS" + LIBS="`$PKG_CONFIG --libs SDL_net` $LIBS" + CPPFLAGS="`$PKG_CONFIG --cflags SDL_net` $CPPFLAGS" + LIBS="`$PKG_CONFIG --libs SDL_ttf` $LIBS" + CPPFLAGS="`$PKG_CONFIG --cflags SDL_ttf` $CPPFLAGS" if test "x$naclbuild_enabled" == "xfalse"; then AC_CHECK_LIB([SDL], [SDL_Init], , -- cgit v1.2.3-70-g09d2