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])
26 AC_DEFINE([SILC_SHA256_X86], [], [SILC_SHA256_X86])
28 if test "${pic_mode:-default}" != "yes" ; then
29 # Don't enable ASM AES with shared libs as the code doesn't support PIC.
30 if test x$have_assembler = xtrue -a "$enable_shared" != "yes"; then
32 AC_DEFINE([SILC_AES_ASM], [], [SILC_AES_ASM])
38 if test "${pic_mode:-default}" != "yes" ; then
39 if test x$have_assembler = xtrue; then
41 SILC_AES_ASM_FLAGS=-prefer-non-pic
42 AC_DEFINE([SILC_AES_ASM], [], [SILC_AES_ASM])
51 SILC_ADD_CC_FLAGS(SILC_CRYPTO, -fno-regmove)
52 if test x$summary_debug = xno -a x$want_cc_optimizations = xtrue; then
53 SILC_ADD_CC_FLAGS(SILC_CRYPTO, -fomit-frame-pointer -O3)
56 AC_SUBST(SILC_CRYPTO_CFLAGS)
57 AC_SUBST(SILC_AES_ASM_FLAGS)
59 # AM_CONDITIONAL is so bad that it itself cannot be defined in conditional
60 AM_CONDITIONAL(SILC_AES_ASM, test x$aes_asm = xtrue)