Commit 5f37e6d4 authored by Thomas Huth's avatar Thomas Huth Committed by Michael Tokarev
Browse files

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: default avatarThomas Huth <thuth@redhat.com>
Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
parent 3bcf7d7d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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
    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