qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL libs when s


From: Yann E. MORIN
Subject: [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL libs when static linking
Date: Mon, 20 Aug 2012 23:39:07 +0200

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" <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]