qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Laurent Vivier <laurent@vivier.eu>,
	peter.maydell@linaro.org
Subject: [Qemu-devel] [PATCH v2] libtasn1: check if static library is present
Date: Sat,  3 Oct 2015 01:01:46 +0200	[thread overview]
Message-ID: <1443826906-32354-1-git-send-email-laurent@vivier.eu> (raw)

Some distros [1] don't ship systematically static libraries,
and pkg-config doesn't give us the information.

This is the case for libtasn1, so add a check in configure
to see if linker is able to find the library.

[1] https://fedoraproject.org/wiki/Archive:PackagingDrafts/StaticLibraryPolicy

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
v2: do not duplicate --static flag
    do not special-casing static case

 configure | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index f14454e..d5e3c91 100755
--- a/configure
+++ b/configure
@@ -2285,8 +2285,13 @@ tasn1=yes
 if $pkg_config --exists "libtasn1"; then
     tasn1_cflags=`$pkg_config --cflags libtasn1`
     tasn1_libs=`$pkg_config --libs libtasn1`
-    test_cflags="$test_cflags $tasn1_cflags"
-    test_libs="$test_libs $tasn1_libs"
+    # some distros (fedora) don't ship all static libraries
+    if compile_prog "$tasn1_cflags" "$tasn1_libs" ; then
+        test_cflags="$test_cflags $tasn1_cflags"
+        test_libs="$test_libs $tasn1_libs"
+    else
+        tasn1=no
+    fi
 else
     tasn1=no
 fi
-- 
2.4.3

                 reply	other threads:[~2015-10-02 23:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1443826906-32354-1-git-send-email-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@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).