x86 optimized SHA-256.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 1 Sep 2007 10:13:01 +0000 (10:13 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 1 Sep 2007 10:13:01 +0000 (10:13 +0000)
lib/silccrypt/configure.ad

index dbc58ab636f0c7f3b64db59676fe106c83d0e16d..721bea2aca855da7f26da32ae1ffbabd8f6a566a 100644 (file)
@@ -23,26 +23,31 @@ SILC_CRYPTO_CFLAGS=
 
 aes_asm=false
 
-if test "${pic_mode:-default}" != "yes" ; then
 case "$host_cpu" in
   i?86)
-    # Don't enable ASM AES with shared libs as the code doesn't support PIC.
-    if test x$have_assembler = xtrue -a "$enable_shared" != "yes"; then
-      aes_asm=true
-      AC_DEFINE([SILC_AES_ASM], [], [SILC_AES_ASM])
+    AC_DEFINE([SILC_SHA256_ASM], [], [SILC_SHA256_ASM])
+
+    if test "${pic_mode:-default}" != "yes" ; then
+      # Don't enable ASM AES with shared libs as the code doesn't support PIC.
+      if test x$have_assembler = xtrue -a "$enable_shared" != "yes"; then
+        aes_asm=true
+        AC_DEFINE([SILC_AES_ASM], [], [SILC_AES_ASM])
+      fi
     fi
     ;;
   x86_64)
-    if test x$have_assembler = xtrue -a "$enable_shared" != "yes"; then
-      aes_asm=true
-      AC_DEFINE([SILC_AES_ASM], [], [SILC_AES_ASM])
+
+    if test "${pic_mode:-default}" != "yes" ; then
+      if test x$have_assembler = xtrue -a "$enable_shared" != "yes"; then
+        aes_asm=true
+        AC_DEFINE([SILC_AES_ASM], [], [SILC_AES_ASM])
+      fi
     fi
     ;;
   default)
     aes_asm=false
     ;;
 esac
-fi
 
 SILC_ADD_CC_FLAGS(SILC_CRYPTO, -fno-regmove)
 if test x$summary_debug = xno -a x$want_cc_optimizations = xtrue; then