* [Qemu-devel] [PATCH v2] libtasn1: check if static library is present
@ 2015-10-02 23:01 Laurent Vivier
0 siblings, 0 replies; only message in thread
From: Laurent Vivier @ 2015-10-02 23:01 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Laurent Vivier, peter.maydell
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-02 23:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02 23:01 [Qemu-devel] [PATCH v2] libtasn1: check if static library is present Laurent Vivier
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).