Added SILC Thread Queue API
[silc.git] / lib / silccrypt / configure.ad
index d392563f8acab0ce26d89e35d3885b158240758c..01434b039b8a890702cbd3a37b1763bf165e13e4 100644 (file)
@@ -22,18 +22,26 @@ AC_MSG_NOTICE([configuring crypto library])
 SILC_CRYPTO_CFLAGS=
 
 aes_asm=false
+
 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_X86], [], [SILC_SHA256_X86])
+
+    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)
@@ -42,7 +50,7 @@ case "$host_cpu" in
 esac
 
 SILC_ADD_CC_FLAGS(SILC_CRYPTO, -fno-regmove)
-if test x$summary_debug = xno; then
+if test x$summary_debug = xno -a x$want_cc_optimizations = xtrue; then
   SILC_ADD_CC_FLAGS(SILC_CRYPTO, -fomit-frame-pointer -O3)
 fi