qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: qemu-trivial@nongnu.org
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Subject: [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL libs when static linking
Date: Mon, 20 Aug 2012 23:39:07 +0200	[thread overview]
Message-ID: <1345498749-16769-1-git-send-email-yann.morin.1998@free.fr> (raw)

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



             reply	other threads:[~2012-08-20 21:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-20 21:39 Yann E. MORIN [this message]
2012-08-20 21:39 ` [Qemu-trivial] [PATCH 2/3] configure: fix detection for SDL libs when static linking 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345498749-16769-1-git-send-email-yann.morin.1998@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).