From: Thomas Huth Date: Tue, 13 Jun 2017 18:00:44 +0000 (+0200) Subject: configure: Fix build with pkg-config and --static --enable-sdl X-Git-Tag: v2.10.0-rc0~79^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f37e6d4a7b22ccf1bb8fa4eb35784d90ff78fbc;p=thirdparty%2Fqemu.git configure: Fix build with pkg-config and --static --enable-sdl The configure script prefers pkg-config over sdl-config, but the "--static-libs" parameter only exists for the latter. With pkg-config, "--static --libs" have to be used instead. Buglink: https://bugs.launchpad.net/qemu/+bug/984516 Signed-off-by: Thomas Huth Signed-off-by: Michael Tokarev --- diff --git a/configure b/configure index 806658c98b2..ce7e8aa8426 100755 --- a/configure +++ b/configure @@ -2733,7 +2733,11 @@ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } EOF sdl_cflags=$($sdlconfig --cflags 2>/dev/null) if test "$static" = "yes" ; then - sdl_libs=$($sdlconfig --static-libs 2>/dev/null) + if $pkg_config $sdlname --exists; then + sdl_libs=$($pkg_config $sdlname --static --libs 2>/dev/null) + else + sdl_libs=$($sdlconfig --static-libs 2>/dev/null) + fi else sdl_libs=$($sdlconfig --libs 2>/dev/null) fi