qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL libs when static linking
@ 2012-08-20 21:39 Yann E. MORIN
  2012-08-20 21:39 ` [Qemu-trivial] [PATCH 2/3] configure: fix detection for SDL " Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Yann E. MORIN @ 2012-08-20 21:39 UTC (permalink / raw)
  To: qemu-trivial; +Cc: Yann E. MORIN

Currently, configure uses the same code-path to check for cURL libraries,
whether we are doing a static or dynamic build.

Fix that by pasing the proper arguments: '--static-libs' for curl-config
and '--static --libs' for pkg-config when a static build is attempted.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 configure |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 60d266f..8f8ae8a 100755
--- a/configure
+++ b/configure
@@ -2077,8 +2077,10 @@ fi
 
 if $pkg_config libcurl --modversion >/dev/null 2>&1; then
   curlconfig="$pkg_config libcurl"
+  curlconfig_staticlibs="--static --libs"
 else
   curlconfig=curl-config
+  curlconfig_staticlibs="--static-libs"
 fi
 
 if test "$curl" != "no" ; then
@@ -2087,7 +2089,11 @@ if test "$curl" != "no" ; then
 int main(void) { curl_easy_init(); curl_multi_setopt(0, 0, 0); return 0; }
 EOF
   curl_cflags=`$curlconfig --cflags 2>/dev/null`
-  curl_libs=`$curlconfig --libs 2>/dev/null`
+  if test "$static" = "yes" ; then
+    curl_libs=`$curlconfig $curlconfig_staticlibs 2>/dev/null`
+  else
+    curl_libs=`$curlconfig --libs 2>/dev/null`
+  fi
   if compile_prog "$curl_cflags" "$curl_libs" ; then
     curl=yes
     libs_tools="$curl_libs $libs_tools"
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-27 17:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20 21:39 [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL libs when static linking Yann E. MORIN
2012-08-20 21:39 ` [Qemu-trivial] [PATCH 2/3] configure: fix detection for SDL " Yann E. MORIN
2012-08-20 21:39 ` [Qemu-trivial] [PATCH 3/3] configure: fix detection for Spice " Yann E. MORIN
2012-08-24 11:02 ` [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL " Stefan Hajnoczi
2012-08-27 17:21   ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).