From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQmIm-0005F2-Ga for qemu-devel@nongnu.org; Wed, 06 Aug 2008 12:55:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQmIl-0005Eo-Oz for qemu-devel@nongnu.org; Wed, 06 Aug 2008 12:55:56 -0400 Received: from [199.232.76.173] (port=55075 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQmIl-0005El-Jg for qemu-devel@nongnu.org; Wed, 06 Aug 2008 12:55:55 -0400 Received: from savannah.gnu.org ([199.232.41.3]:39858 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KQmIl-00053u-Gq for qemu-devel@nongnu.org; Wed, 06 Aug 2008 12:55:55 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KQmIh-0003av-34 for qemu-devel@nongnu.org; Wed, 06 Aug 2008 16:55:51 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KQmIg-0003am-Rk for qemu-devel@nongnu.org; Wed, 06 Aug 2008 16:55:51 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Wed, 06 Aug 2008 16:55:50 +0000 Subject: [Qemu-devel] [4989] Fix gnutls autodetection when using a cross-compiler. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 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 < +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