2 # lib/silccrypt/configure.ad
4 # Author: Pekka Riikonen <priikone@silcnet.org>
6 # Copyright (C) 2006 - 2008 Pekka Riikonen
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; version 2 of the License.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
18 AC_MSG_NOTICE([configuring crypto library])
25 AC_DEFINE([SILC_SHA256_X86], [], [SILC_SHA256_X86])
27 if test "${pic_mode:-default}" != "yes" ; then
28 # Don't enable ASM AES with shared libs as the code doesn't support PIC.
29 if test x$have_assembler = xtrue -a "$enable_shared" != "yes"; then
31 AC_DEFINE([SILC_AES_ASM], [], [SILC_AES_ASM])
37 if test "${pic_mode:-default}" != "yes" ; then
38 if test x$have_assembler = xtrue -a "$enable_shared" != "yes"; then
40 AC_DEFINE([SILC_AES_ASM], [], [SILC_AES_ASM])
49 SILC_ADD_CC_FLAGS(SILC_CRYPTO, -fno-regmove)
50 if test x$summary_debug = xno -a x$want_cc_optimizations = xtrue; then
51 SILC_ADD_CC_FLAGS(SILC_CRYPTO, -fomit-frame-pointer -O3)
54 AC_SUBST(SILC_CRYPTO_CFLAGS)
56 # AM_CONDITIONAL is so bad that it itself cannot be defined in conditional
57 AM_CONDITIONAL(SILC_AES_ASM, test x$aes_asm = xtrue)