From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi9Ku-0001Qh-H4 for qemu-devel@nongnu.org; Fri, 02 Oct 2015 19:01:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zi9Kp-0002QH-Ko for qemu-devel@nongnu.org; Fri, 02 Oct 2015 19:01:56 -0400 Received: from smtp4-g21.free.fr ([2a01:e0c:1:1599::13]:1197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi9Kp-0002OY-FM for qemu-devel@nongnu.org; Fri, 02 Oct 2015 19:01:51 -0400 From: Laurent Vivier Date: Sat, 3 Oct 2015 01:01:46 +0200 Message-Id: <1443826906-32354-1-git-send-email-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2] libtasn1: check if static library is present List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , peter.maydell@linaro.org 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]=C2=A0https://fedoraproject.org/wiki/Archive:PackagingDrafts/StaticLib= raryPolicy Signed-off-by: Laurent Vivier --- 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=3Dyes if $pkg_config --exists "libtasn1"; then tasn1_cflags=3D`$pkg_config --cflags libtasn1` tasn1_libs=3D`$pkg_config --libs libtasn1` - test_cflags=3D"$test_cflags $tasn1_cflags" - test_libs=3D"$test_libs $tasn1_libs" + # some distros (fedora) don't ship all static libraries + if compile_prog "$tasn1_cflags" "$tasn1_libs" ; then + test_cflags=3D"$test_cflags $tasn1_cflags" + test_libs=3D"$test_libs $tasn1_libs" + else + tasn1=3Dno + fi else tasn1=3Dno fi --=20 2.4.3