X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccrypt%2Fconfigure.ad;h=64cf800b6938d2f144d1f7badf7026d72962a852;hb=6d9fec66fd86ab5bc5de8f63c45363ef2c26b490;hp=d392563f8acab0ce26d89e35d3885b158240758c;hpb=8fd8212bcd16f2b53fbedff2a9b9a4e8c15b9695;p=crypto.git diff --git a/lib/silccrypt/configure.ad b/lib/silccrypt/configure.ad index d392563f..64cf800b 100644 --- a/lib/silccrypt/configure.ad +++ b/lib/silccrypt/configure.ad @@ -1,10 +1,9 @@ -#ifdef SILC_DIST_CRYPTO # # lib/silccrypt/configure.ad # # Author: Pekka Riikonen # -# Copyright (C) 2006 - 2007 Pekka Riikonen +# Copyright (C) 2006 - 2008 Pekka Riikonen # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,24 +15,32 @@ # GNU General Public License for more details. # -if test x$compile_libs = xtrue; then - AC_MSG_NOTICE([configuring crypto library]) SILC_CRYPTO_CFLAGS= aes_asm=false +SILC_AES_ASM_FLAGS= + 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; then + aes_asm=true + SILC_AES_ASM_FLAGS=-prefer-non-pic + AC_DEFINE([SILC_AES_ASM], [], [SILC_AES_ASM]) + fi fi ;; default) @@ -42,22 +49,12 @@ 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 AC_SUBST(SILC_CRYPTO_CFLAGS) - -AC_CONFIG_FILES( -lib/silccrypt/Makefile -#ifdef SILC_DIST_INPLACE -lib/silccrypt/tests/Makefile -#endif SILC_DIST_INPLACE -) - -fi # compile_libs +AC_SUBST(SILC_AES_ASM_FLAGS) # AM_CONDITIONAL is so bad that it itself cannot be defined in conditional AM_CONDITIONAL(SILC_AES_ASM, test x$aes_asm = xtrue) - -#endif SILC_DIST_CRYPTO