From: Nikos Mavrogiannopoulos Date: Sat, 21 Dec 2013 08:06:10 +0000 (+0100) Subject: Improved nettle check for registration of accelerated ciphers. X-Git-Tag: gnutls_3_3_0pre0~427 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20942b7188f8542fa9e6612ecc91dabb16bbcf16;p=thirdparty%2Fgnutls.git Improved nettle check for registration of accelerated ciphers. --- diff --git a/lib/Makefile.am b/lib/Makefile.am index 2a93e41c87..612ec4b266 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -22,16 +22,12 @@ ACLOCAL_AMFLAGS = -I ../m4 -I ../gl/m4 BUILT_SOURCES = pkix_asn1_tab.c gnutls_asn1_tab.c -SUBDIRS = includes x509 auth ext algorithms extras +SUBDIRS = includes x509 auth ext algorithms extras accelerated if ENABLE_MINITASN1 SUBDIRS += minitasn1 endif -if ENABLE_NETTLE -SUBDIRS += accelerated -endif - localedir = $(datadir)/locale AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) $(NETTLE_CFLAGS) diff --git a/lib/accelerated/Makefile.am b/lib/accelerated/Makefile.am index f1a1982fa0..37958ba3e5 100644 --- a/lib/accelerated/Makefile.am +++ b/lib/accelerated/Makefile.am @@ -38,11 +38,13 @@ EXTRA_DIST = accelerated.h cryptodev.h libaccelerated_la_SOURCES = accelerated.c cryptodev.c cryptodev-gcm.c libaccelerated_la_LIBADD = +if ENABLE_NETTLE if ASM_X86 SUBDIRS += x86 AM_CFLAGS += -DASM_X86 libaccelerated_la_LIBADD += x86/libx86.la endif +endif if ASM_X86_32 AM_CFLAGS += -DASM_X86_32 diff --git a/lib/accelerated/accelerated.c b/lib/accelerated/accelerated.c index 7ad1cb5b28..dc2ba46e1c 100644 --- a/lib/accelerated/accelerated.c +++ b/lib/accelerated/accelerated.c @@ -29,7 +29,7 @@ void _gnutls_register_accel_crypto(void) { -#if defined(ASM_X86) +#if defined(ASM_X86) && defined(ENABLE_NETTLE) if (gnutls_have_cpuid() != 0) { register_x86_crypto(); }