X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccrypt%2Fconfigure.ad;h=dbc58ab636f0c7f3b64db59676fe106c83d0e16d;hb=4a7c8b4e56accaaaf098155a580df023bfb91c69;hp=b9ccd4dadb01ee9bc548c765c4514dcd7f2d3bba;hpb=97ca3ffe0ce65ac0c5fa3274284825537e996c78;p=silc.git diff --git a/lib/silccrypt/configure.ad b/lib/silccrypt/configure.ad index b9ccd4da..dbc58ab6 100644 --- a/lib/silccrypt/configure.ad +++ b/lib/silccrypt/configure.ad @@ -1,9 +1,10 @@ +#ifdef SILC_DIST_CRYPTO # # lib/silccrypt/configure.ad # # Author: Pekka Riikonen # -# Copyright (C) 2006 Pekka Riikonen +# Copyright (C) 2006 - 2007 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 @@ -21,15 +22,18 @@ AC_MSG_NOTICE([configuring crypto library]) SILC_CRYPTO_CFLAGS= aes_asm=false + +if test "${pic_mode:-default}" != "yes" ; then case "$host_cpu" in i?86) - if test x$have_assembler = xtrue; 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 ;; x86_64) - if test x$have_assembler = xtrue; then + if test x$have_assembler = xtrue -a "$enable_shared" != "yes"; then aes_asm=true AC_DEFINE([SILC_AES_ASM], [], [SILC_AES_ASM]) fi @@ -38,10 +42,10 @@ case "$host_cpu" in aes_asm=false ;; esac -AM_CONDITIONAL(SILC_AES_ASM, test x$aes_asm = xtrue) +fi 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 @@ -55,3 +59,8 @@ lib/silccrypt/tests/Makefile ) fi # compile_libs + +# 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