From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LVXww-0001lC-Fn for qemu-devel@nongnu.org; Fri, 06 Feb 2009 16:09:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LVXws-0001hq-Nt for qemu-devel@nongnu.org; Fri, 06 Feb 2009 16:09:19 -0500 Received: from [199.232.76.173] (port=51588 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LVXwr-0001h1-Qn for qemu-devel@nongnu.org; Fri, 06 Feb 2009 16:09:17 -0500 Received: from mx2.redhat.com ([66.187.237.31]:54580) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LVXwq-0007o4-V0 for qemu-devel@nongnu.org; Fri, 06 Feb 2009 16:09:17 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n16L9F7x001178 for ; Fri, 6 Feb 2009 16:09:15 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n16L9F49029500 for ; Fri, 6 Feb 2009 16:09:15 -0500 Received: from blackpad.localdomain (vpn-10-11.bos.redhat.com [10.16.10.11]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n16L9EsC014603 for ; Fri, 6 Feb 2009 16:09:14 -0500 From: Eduardo Habkost Date: Fri, 6 Feb 2009 19:08:58 -0200 Message-Id: <1233954540-4754-8-git-send-email-ehabkost@redhat.com> In-Reply-To: <1233954540-4754-1-git-send-email-ehabkost@redhat.com> References: <1233954540-4754-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 7/9] configure: add check for libgcrypt 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 Signed-off-by: Eduardo Habkost --- Makefile | 6 ++++++ Makefile.target | 5 +++++ configure | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index 98f67b1..f634d1a 100644 --- a/Makefile +++ b/Makefile @@ -162,6 +162,12 @@ tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o OBJS+=$(addprefix slirp/, $(SLIRP_OBJS)) endif +ifdef CONFIG_GCRYPT +CFLAGS += $(CONFIG_GCRYPT_CFLAGS) +LIBS += $(CONFIG_GCRYPT_LIBS) +endif + + LIBS+=$(VDE_LIBS) cocoa.o: cocoa.m diff --git a/Makefile.target b/Makefile.target index 28ba17f..f6182fe 100644 --- a/Makefile.target +++ b/Makefile.target @@ -554,6 +554,11 @@ CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS) LIBS += $(CONFIG_VNC_TLS_LIBS) endif +ifdef CONFIG_GCRYPT +CPPFLAGS += $(CONFIG_GCRYPT_CFLAGS) +LIBS += $(CONFIG_GCRYPT_LIBS) +endif + ifdef CONFIG_BLUEZ LIBS += $(CONFIG_BLUEZ_LIBS) endif diff --git a/configure b/configure index d2aa783..d38d99e 100755 --- a/configure +++ b/configure @@ -164,6 +164,7 @@ fmod_lib="" fmod_inc="" oss_lib="" vnc_tls="yes" +libgcrypt="yes" qcow_aes="yes" vnc_des="yes" bsd="no" @@ -389,6 +390,8 @@ for opt do ;; --disable-vnc-tls) vnc_tls="no" ;; + --disable-gcrypt) libgcrypt="no" + ;; --disable-qcow-aes) qcow_aes="no" ;; --disable-vnc-des) vnc_des="no" @@ -550,6 +553,7 @@ echo " Available cards: $audio_possible_cards" echo " --enable-mixemu enable mixer emulation" echo " --disable-brlapi disable BrlAPI" echo " --disable-vnc-tls disable TLS encryption for VNC server" +echo " --disable-gcrypt disable libgcrypt usage" echo " --disable-qcow-aes disable AES encrypton support on qcow" echo " --disable-vnc-des disable VNC DES-challenge authentication" echo " --disable-curses disable curses output" @@ -831,6 +835,28 @@ EOF fi ########################################## +# libgcrypt detection +if test "$libgcrypt" = "yes" ; then +cat > $TMPC < +int main(void) { + gcry_cipher_hd_t ci; + gcry_error_t e = gcry_cipher_open(&ci, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0); + return 0; +} +EOF + libgcrypt_cflags=`libgcrypt-config --cflags 2> /dev/null` + libgcrypt_libs=`libgcrypt-config --libs 2> /dev/null` + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $libgcrypt_cflags $TMPC \ + $libgcrypt_libs > /dev/null 2> /dev/null ; then + : + else + libgcrypt="no" + fi +fi + + +########################################## # vde libraries probe if test "$vde" = "yes" ; then cat > $TMPC << EOF @@ -1133,6 +1159,11 @@ echo "mingw32 support $mingw32" echo "Audio drivers $audio_drv_list" echo "Extra audio cards $audio_card_list" echo "Mixer emulation $mixemu" +echo "libgcrypt support $libgcrypt" +if test "$libgcrypt" = "yes" ; then + echo " gcrypt CFLAGS $libgcrypt_cflags" + echo " gcrypt LIBS $libgcrypt_libs" +fi echo "VNC TLS support $vnc_tls" if test "$vnc_tls" = "yes" ; then echo " TLS CFLAGS $vnc_tls_cflags" @@ -1385,6 +1416,12 @@ if [ "$vnc_des" = "yes" ];then echo "CONFIG_VNC_DES=yes" >> $config_mak echo "#define CONFIG_VNC_DES 1" >> $config_h fi +if test "$libgcrypt" = "yes" ; then + echo "CONFIG_GCRYPT=yes" >> $config_mak + echo "CONFIG_GCRYPT_CFLAGS=$libgcrypt_cflags" >> $config_mak + echo "CONFIG_GCRYPT_LIBS=$libgcrypt_libs" >> $config_mak + echo "#define CONFIG_GCRYPT 1" >> $config_h +fi if [ "$qcow_aes" = "yes" ];then echo "#define CONFIG_QCOW_AES 1" >> $config_h fi -- 1.6.0.2.GIT