qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [4989] Fix gnutls autodetection when using a cross-compiler.
@ 2008-08-06 16:55 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2008-08-06 16:55 UTC (permalink / raw)
  To: qemu-devel

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 <aliguori@us.ibm.com>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-08-06 16:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-06 16:55 [Qemu-devel] [4989] Fix gnutls autodetection when using a cross-compiler Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).