From patchwork Mon Jan 23 07:41:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Trofimovich X-Patchwork-Id: 137290 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CF575B6F71 for ; Mon, 23 Jan 2012 19:33:43 +1100 (EST) Received: from localhost ([::1]:35615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpFLM-00050y-U1 for incoming@patchwork.ozlabs.org; Mon, 23 Jan 2012 03:33:36 -0500 Received: from eggs.gnu.org ([140.186.70.92]:59804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpEXT-0002Ug-J9 for qemu-devel@nongnu.org; Mon, 23 Jan 2012 02:42:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpEXS-0006as-KP for qemu-devel@nongnu.org; Mon, 23 Jan 2012 02:42:03 -0500 Received: from mx.anti-virus.by ([93.125.111.29]:58701 helo=tux.vba.com.by) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpEXS-0006am-E9 for qemu-devel@nongnu.org; Mon, 23 Jan 2012 02:42:02 -0500 Received: from st (st.vba.domain [192.168.234.118]) by tux.vba.com.by (Postfix) with SMTP id 94B5892DB22; Mon, 23 Jan 2012 10:42:00 +0300 (FET) Received: by st (sSMTP sendmail emulation); Mon, 23 Jan 2012 10:41:59 +0300 From: Sergei Trofimovich To: qemu-devel@nongnu.org Date: Mon, 23 Jan 2012 10:41:38 +0300 Message-Id: <1327304498-11274-2-git-send-email-slyfox@inbox.ru> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1327304498-11274-1-git-send-email-slyfox@inbox.ru> References: <1327304498-11274-1-git-send-email-slyfox@inbox.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 93.125.111.29 X-Mailman-Approved-At: Mon, 23 Jan 2012 03:32:39 -0500 Cc: Sergei Trofimovich Subject: [Qemu-devel] [PATCH 2/2] ./configure: add link check for nss-smartcard X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Sergei Trofimovich Current './configure --static && make' fails for me: LINK qemu-nbd /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lssl3 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsmime3 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnssutil3 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnss3 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lplds4 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lplc4 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnspr4 My system does not provide static libraries for nss, so fix autoconfiguration by link checking. Signed-off-by: Sergei Trofimovich --- configure | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/configure b/configure index f3dcfba..9ef8422 100755 --- a/configure +++ b/configure @@ -2520,11 +2520,16 @@ if test "$smartcard" != "no" ; then smartcard_cflags="" # TODO - what's the minimal nss version we support? if test "$smartcard_nss" != "no"; then - if $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 ; then + cat > $TMPC << EOF +#include +int main(void) { PK11_FreeSlot(0); return 0; } +EOF + smartcard_cflags="-I\$(SRC_PATH)/libcacard" + libcacard_libs=$($pkg_config --libs nss 2>/dev/null) + libcacard_cflags=$($pkg_config --cflags nss 2>/dev/null) + if $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 && \ + compile_prog "$smartcard_cflags $libcacard_cflags" "$libcacard_libs"; then smartcard_nss="yes" - smartcard_cflags="-I\$(SRC_PATH)/libcacard" - libcacard_libs=$($pkg_config --libs nss 2>/dev/null) - libcacard_cflags=$($pkg_config --cflags nss 2>/dev/null) QEMU_CFLAGS="$QEMU_CFLAGS $smartcard_cflags $libcacard_cflags" LIBS="$libcacard_libs $LIBS" else