diff mbox

[Bug,984516,NEW] should use sdl-config for static build not pkg-config

Message ID 20120418021847.6939.88224.malonedeb@chaenomeles.canonical.com
State New
Headers show

Commit Message

Kenneth Salerno April 18, 2012, 2:18 a.m. UTC
Public bug reported:

In the configure script when a user wants to compile a static QEMU and
enable SDL support (i.e. ./configure --static --enable-sdl):

pkg-config does not have an option "--static-libs". For correct results
(to find the static archive libSDL.a) you need to use sdl-config
--static-libs.


This is how I get it to work for me anyway:



** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: sdl static

Comments

Thomas Huth April 18, 2012, 5:43 a.m. UTC | #1
pkg-config supports --static, and QEMU uses it.

Please try whether

   pkg-config --libs --static sdl

gives the correct flags with your distribution. If not, that
distribution is buggy.
Thomas Huth July 14, 2017, 7:06 a.m. UTC | #2
Finally fixed here:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=5f37e6d4a7b22ccf1bb8fa4

** Changed in: qemu
       Status: New => Fix Committed

** Changed in: qemu
     Assignee: (unassigned) => Thomas Huth (th-huth)
Thomas Huth Aug. 30, 2017, 8:16 p.m. UTC | #3
** Changed in: qemu
       Status: Fix Committed => Fix Released
diff mbox

Patch

diff --git a/configure b/configure
index 2d62d12..3de4c9b 100755
--- a/configure
+++ b/configure
@@ -1548,7 +1548,7 @@  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`
+    sdl_libs=`${SDL_CONFIG-${cross_prefix}sdl-config} --static-libs`
   else
     sdl_libs=`$sdlconfig --libs 2> /dev/null`
   fi