diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2015-07-01 18:10:34 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-07-08 13:11:01 +0200 |
commit | ed754746fea55df726f4de3dadb5bea0b6aa7409 (patch) | |
tree | fe9787a567e49367e7129a16b15d2ca5cb09072d /configure | |
parent | 62893b67cd82bbd48b013c1cec25f0d863612c80 (diff) |
crypto: add a nettle cipher implementation
If we are linking to gnutls already and gnutls is built against
nettle, then we should use nettle as a cipher backend in
preference to our built-in backend.
This will be used when linking against some GNUTLS 2.x versions
and all GNUTLS 3.x versions.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-Id: <1435770638-25715-7-git-send-email-berrange@redhat.com>
[Change "#elif" to "#elif defined". - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 35 |
1 files changed, 32 insertions, 3 deletions
@@ -2127,6 +2127,7 @@ fi # GNUTLS probe gnutls_gcrypt=no +gnutls_nettle=no if test "$gnutls" != "no"; then if $pkg_config --exists "gnutls"; then gnutls_cflags=`$pkg_config --cflags gnutls` @@ -2145,14 +2146,25 @@ if test "$gnutls" != "no"; then if $pkg_config --exists 'gnutls >= 3.0'; then gnutls_gcrypt=no + gnutls_nettle=yes elif $pkg_config --exists 'gnutls >= 2.12'; then case `$pkg_config --libs --static gnutls` in - *gcrypt*) gnutls_gcrypt=yes ;; - *nettle*) gnutls_gcrypt=no ;; - *) gnutls_gcrypt=yes ;; + *gcrypt*) + gnutls_gcrypt=yes + gnutls_nettle=no + ;; + *nettle*) + gnutls_gcrypt=no + gnutls_nettle=yes + ;; + *) + gnutls_gcrypt=yes + gnutls_nettle=no + ;; esac else gnutls_gcrypt=yes + gnutls_nettle=no fi elif test "$gnutls" = "yes"; then feature_not_found "gnutls" "Install gnutls devel" @@ -2177,6 +2189,19 @@ if test "$gnutls_gcrypt" != "no"; then fi +if test "$gnutls_nettle" != "no"; then + if $pkg_config --exists "nettle"; then + nettle_cflags=`$pkg_config --cflags nettle` + nettle_libs=`$pkg_config --libs nettle` + libs_softmmu="$nettle_libs $libs_softmmu" + libs_tools="$nettle_libs $libs_tools" + QEMU_CFLAGS="$QEMU_CFLAGS $nettle_cflags" + else + feature_not_found "nettle" "Install nettle devel" + fi +fi + + ########################################## # VTE probe @@ -4489,6 +4514,7 @@ echo "GTK support $gtk" echo "GNUTLS support $gnutls" echo "GNUTLS hash $gnutls_hash" echo "GNUTLS gcrypt $gnutls_gcrypt" +echo "GNUTLS nettle $gnutls_nettle" echo "VTE support $vte" echo "curses support $curses" echo "curl support $curl" @@ -4856,6 +4882,9 @@ fi if test "$gnutls_gcrypt" = "yes" ; then echo "CONFIG_GNUTLS_GCRYPT=y" >> $config_host_mak fi +if test "$gnutls_nettle" = "yes" ; then + echo "CONFIG_GNUTLS_NETTLE=y" >> $config_host_mak +fi if test "$vte" = "yes" ; then echo "CONFIG_VTE=y" >> $config_host_mak echo "VTE_CFLAGS=$vte_cflags" >> $config_host_mak |