From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T89w1-0001LL-Pv for qemu-devel@nongnu.org; Sun, 02 Sep 2012 09:09:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T89w0-00024x-1c for qemu-devel@nongnu.org; Sun, 02 Sep 2012 09:09:53 -0400 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:40078 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T89vz-000239-FH for qemu-devel@nongnu.org; Sun, 02 Sep 2012 09:09:51 -0400 From: "Yann E. MORIN" Date: Sun, 2 Sep 2012 15:09:44 +0200 Message-Id: <1346591386-22698-1-git-send-email-yann.morin.1998@free.fr> Subject: [Qemu-devel] [PATCH 0/2 v3] Fix static linking for cURL and SDL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Stefan Hajnoczi , "Yann E. MORIN" , Peter Maydell Hello All! Currently, configure checks for cURL and SDL with either pkg-config (the default), or with {curl,sdl}-config (as a fallback). But pkg-config and {curl,sdl}-config do not have the same set of options: - to check for shared libs, both use the option: --libs - to check for static libs: - pkg-config uses : --static --libs - {curl,sdl}-config use: --static-libs To add to the complexity, pkg-config is called through the querry_pkg_config wrapper, that already passes --static when static linking is required, but there is no such wrapper for {curl,sdl}-config, so we miss the occasion to pass --static-libs. To fix this: - introduce a new variable QEMU_XXX_CONFIG_LIBS_FLAGS that mirrors the behavior of QEMU_PKG_CONFIG_FLAGS; this variable can be used by all xxx-config scripts (eg. curl-config, but later sdl-config too). Default it to '--libs', which is for shared linking. - properly use either --libs for pkg-config (--static is already taken care of in the wrapper), or $QEMU_XXX_CONFIG_LIBS_FLAGS for {curl,sdl}-config. Changes since v2: - remove trailing reference to cURL in the SDL patch (Stefan Hajnoczi) - sent to qemu-devel and cc qemu-trivial (Peter Maydell, Stefan) - fix type in the name of the new variable Changes since v1: - drop the spice fix, it is not needed (bad env locally) - drop the added --static to calls to pkg-config, as it's already in the wrapper (Stefan Hajnoczi) Regards, Yann E. MORIN.