All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH resend] ./configure: add link check for nss-smartcard
@ 2012-01-31 19:03 Sergei Trofimovich
  2012-02-01 22:12 ` Anthony Liguori
  0 siblings, 1 reply; 2+ messages in thread
From: Sergei Trofimovich @ 2012-01-31 19:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Sergei Trofimovich

From: Sergei Trofimovich <slyfox@gentoo.org>

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 <slyfox@gentoo.org>
CC: qemu-trivial <qemu-trivial@nongnu.org>
---
 configure |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 8fd5404..3b0b300 100755
--- a/configure
+++ b/configure
@@ -2528,11 +2528,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 <pk11pub.h>
+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
-- 
1.7.8.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH resend] ./configure: add link check for nss-smartcard
  2012-01-31 19:03 [Qemu-devel] [PATCH resend] ./configure: add link check for nss-smartcard Sergei Trofimovich
@ 2012-02-01 22:12 ` Anthony Liguori
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2012-02-01 22:12 UTC (permalink / raw)
  To: Sergei Trofimovich; +Cc: qemu-trivial, qemu-devel, Sergei Trofimovich

On 01/31/2012 01:03 PM, Sergei Trofimovich wrote:
> From: Sergei Trofimovich<slyfox@gentoo.org>
>
> 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<slyfox@gentoo.org>
> CC: qemu-trivial<qemu-trivial@nongnu.org>

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>   configure |   13 +++++++++----
>   1 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/configure b/configure
> index 8fd5404..3b0b300 100755
> --- a/configure
> +++ b/configure
> @@ -2528,11 +2528,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<pk11pub.h>
> +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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-01 22:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-31 19:03 [Qemu-devel] [PATCH resend] ./configure: add link check for nss-smartcard Sergei Trofimovich
2012-02-01 22:12 ` Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.