[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] configure: fix libsmartcard_nss compile check

From: Alexander Graf
Subject: [Qemu-devel] [PATCH] configure: fix libsmartcard_nss compile check
Date: Mon, 9 Jul 2012 14:06:40 +0200

When just calling ./configure on my box, I always ran into the same issue:

In file included from /usr/include/nss3/pkcs11t.h:1780,
                 from /usr/include/nss3/keythi.h:41,
                 from /usr/include/nss3/keyt.h:41,
                 from /usr/include/nss3/pk11pub.h:43,
                 from libcacard/vcard_emul_nss.c:21:
/usr/include/nss3/pkcs11n.h:365:26: error: "__GNUC_MINOR" is not defined

This is a bug in nss3. But why didn't configure bail out of the feature
if it doesn't even compile? Because this really is just a warning, not an
error. But configure builds its test program without -Werror, while we do
build our sources with -Werror by default.

Force the check to also use -Werror. This fixes the default build for me again.

Signed-off-by: Alexander Graf <address@hidden>
 configure |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 9f071b7..d28a909 100755
--- a/configure
+++ b/configure
@@ -2642,6 +2642,10 @@ EOF
         libcacard_libs="$($pkg_config --libs nss 2>/dev/null) $glib_libs"
         libcacard_cflags="$($pkg_config --cflags nss 2>/dev/null) $glib_cflags"
+        # nss < 3.13.3 has a nasty warning that can trigger compile failures
+        # with -Werror. Unfortunately, we don't know if -Werror is goint to
+        # be used here yet, so let's just assume it to be safe.
+        libcacard_cflags="$libcacard_cflags -Werror"
         if $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 && \
           compile_prog "$smartcard_cflags $libcacard_cflags" 
"$libcacard_libs"; then

reply via email to

[Prev in Thread] Current Thread [Next in Thread]