qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [4989] Fix gnutls autodetection when using a cross-compiler


From: Anthony Liguori
Subject: [Qemu-devel] [4989] Fix gnutls autodetection when using a cross-compiler.
Date: Wed, 06 Aug 2008 16:55:50 +0000

Revision: 4989
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4989
Author:   aliguori
Date:     2008-08-06 16:55:50 +0000 (Wed, 06 Aug 2008)

Log Message:
-----------
Fix gnutls autodetection when using a cross-compiler.

It is not enough to check for pkg-config gnutls.  You may be using a
cross-compiler and have gnutls available on the host but not for the target.
This patch changes the detection to try and build an application using gnutls
and whatever compiler is available.

Signed-off-by: Anthony Liguori <address@hidden>

Modified Paths:
--------------
    trunk/configure

Modified: trunk/configure
===================================================================
--- trunk/configure     2008-08-06 15:28:20 UTC (rev 4988)
+++ trunk/configure     2008-08-06 16:55:50 UTC (rev 4989)
@@ -737,12 +737,19 @@
 ##########################################
 # VNC TLS detection
 if test "$vnc_tls" = "yes" ; then
-  `pkg-config gnutls` || vnc_tls="no"
+cat > $TMPC <<EOF
+#include <gnutls/gnutls.h>
+int main(void) { gnutls_session_t s; gnutls_init(&s, GNUTLS_SERVER); return 0; 
}
+EOF
+    vnc_tls_cflags=`pkg-config --cflags gnutls 2> /dev/null`
+    vnc_tls_libs=`pkg-config --libs gnutls 2> /dev/null`
+    if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $vnc_tls_cflags $TMPC \
+           $vnc_tls_libs 2> /dev/null ; then
+       :
+    else
+       vnc_tls="no"
+    fi
 fi
-if test "$vnc_tls" = "yes" ; then
-  vnc_tls_cflags=`pkg-config --cflags gnutls`
-  vnc_tls_libs=`pkg-config --libs gnutls`
-fi
 
 ##########################################
 # vde libraries probe






reply via email to

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