Major restructuring of the internals of SILC Cipher API
[crypto.git] / configure.ad
1 #
2 #  configure.ad
3 #
4 #  Author: Pekka Riikonen <priikone@silcnet.org>
5 #
6 #  Copyright (C) 2000 - 2008 Pekka Riikonen
7 #
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.
11 #
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.
16 #
17
18 AD_INIT
19 AC_CANONICAL_SYSTEM
20 AM_INIT_AUTOMAKE
21 AC_PREREQ(2.52)
22 AC_CONFIG_HEADERS(cryptodefs.h)
23
24 AC_PROG_INSTALL
25 AC_PROG_MAKE_SET
26
27 AC_PROG_CC
28 AM_PROG_AS
29 AC_C_INLINE
30 AC_C_CONST
31
32 AC_PROG_RANLIB
33 #ifdef SILC_DIST_INPLACE
34 AC_DISABLE_SHARED
35 #endif SILC_DIST_INPLACE
36 AC_PROG_LIBTOOL
37
38 SILC_TOP_SRCDIR=`pwd`
39
40 ##
41 ## Library versioning.
42 ##
43
44 # Do the releases and library versioning according to following rules:
45 #
46 #  - If any code has changed in library, increment CRYPTO_REVISION
47 #  - If API were added, removed or changed, set CRYPTO_REVISION to 0
48 #  - If API were added, removed or changed, increment CRYPTO_CURRENT
49 #  - If APi were added, increment CRYPTO_AGE
50 #  - If API were removed, set CRYPTO_AGE to 0
51 #
52
53 # Base version for library.
54 CRYPTO_BASE_VERSION=1.2
55
56 # Library versions
57 CRYPTO_CURRENT=1                # prev = 0
58 CRYPTO_REVISION=0               # prev = 0
59 CRYPTo_AGE=0                    # prev = 0
60
61 # Substitute the version numbers
62 AC_SUBST(CRYPTO_BASE_VERSION)
63 AC_SUBST(CRYPTO_CURRENT)
64 AC_SUBST(CRYPTO_REVISION)
65 AC_SUBST(CRYPTO_AGE)
66
67
68 ##
69 ##  Installation
70 ##
71
72 # Default installation destination
73 AC_PREFIX_DEFAULT(/usr/local)
74 if test "x$prefix" != xNONE; then
75   silc_prefix="$prefix"
76 else
77   silc_prefix="$ac_default_prefix"
78   prefix="$silc_prefix"
79 fi
80
81
82 ##
83 ## Detect CPU
84 ##
85
86 # Disable all CPU feature optimizations
87 AC_MSG_CHECKING(whether to enable CPU feature optimizations)
88 AC_ARG_ENABLE(cpu-optimizations,
89   [  --disable-cpu-optimizations  do not use any CPU feature optimizations],
90   [
91     AC_MSG_RESULT(no)
92     AC_DEFINE([SILC_NO_CPU_OPTIMIZATIONS], [], [SILC_NO_CPU_OPTIMIZATIONS])
93     want_cpu_optimizations=false
94   ],
95   [
96     AC_MSG_RESULT(yes)
97     want_cpu_optimizations=true
98   ])
99 AM_CONDITIONAL(SILC_NO_CPU_OPTIMIZATIONS,
100                test x$want_cpu_optimizations = xfalse)
101
102 SILC_SYSTEM_IS_SMP(AC_DEFINE([SILC_SMP], [], [SILC_SMP]), [],
103                    AC_DEFINE([SILC_SMP], [], [SILC_SMP]))
104 cpu_i386=false
105 cpu_i486=false
106 cpu_i586=false
107 cpu_i686=false
108 cpu_i786=false
109 cpu_x86_64=false
110 cpu_ppc=false
111 cpu_ia64=false
112 case "$host_cpu" in
113   # All following Intels are considered 32-bit CPUs.
114   i?86)
115     # All CPUs of today are considered i386 and i486 compatible */
116     cpu_i386=true
117     cpu_i486=true
118
119     if test "x$host_cpu" = "xi586"; then
120       cpu_i586=true
121     fi
122
123     if test "x$host_cpu" = "xi686"; then
124       cpu_i586=true
125       cpu_i686=true
126     fi
127
128     if test "x$host_cpu" = "xi786"; then
129       cpu_i586=true
130       cpu_i686=true
131       cpu_i786=true
132     fi
133
134     # Check for specific CPU features
135     SILC_CPU_FLAG(mmx, true, AC_DEFINE([SILC_CPU_MMX], [], [SILC_CPU_MMX]), [])
136     SILC_CPU_FLAG(sse2, true, AC_DEFINE([SILC_CPU_SSE2], [], [SILC_CPU_SSE2]), [])
137     SILC_CPU_FLAG(pni, true, AC_DEFINE([SILC_CPU_SSE3], [], [SILC_CPU_SSE3]), [])
138     SILC_CPU_FLAG(ssse3, true, AC_DEFINE([SILC_CPU_SSSE3], [], [SILC_CPU_SSSE3]), [])
139     SILC_CPU_FLAG(sse4, true, AC_DEFINE([SILC_CPU_SSE4], [], [SILC_CPU_SSE4]), [])
140     ;;
141
142   # Intel IA-64, 64-bit CPU (not x86_64 compatible)
143   ia64)
144     AC_DEFINE([SILC_IA64], [], [SILC_IA64])
145     cpu_ia64=true
146
147     # Check for specific CPU features
148     SILC_CPU_FLAG(mmx, true, AC_DEFINE([SILC_CPU_MMX], [], [SILC_CPU_MMX]), [])
149     SILC_CPU_FLAG(sse2, true, AC_DEFINE([SILC_CPU_SSE2], [], [SILC_CPU_SSE2]), [])
150     SILC_CPU_FLAG(pni, true, AC_DEFINE([SILC_CPU_SSE3], [], [SILC_CPU_SSE3]), [])
151     SILC_CPU_FLAG(ssse3, true, AC_DEFINE([SILC_CPU_SSSE3], [], [SILC_CPU_SSSE3]), [])
152     SILC_CPU_FLAG(sse4, true, AC_DEFINE([SILC_CPU_SSE4], [], [SILC_CPU_SSE4]), [])
153     ;;
154
155   # AMD/Intel x86_64, 64-bit CPU
156   x86_64)
157     cpu_x86_64=true
158
159     # Check for specific CPU features
160     SILC_CPU_FLAG(mmx, true, AC_DEFINE([SILC_CPU_MMX], [], [SILC_CPU_MMX]), [])
161     SILC_CPU_FLAG(sse2, true, AC_DEFINE([SILC_CPU_SSE2], [], [SILC_CPU_SSE2]), [])
162     SILC_CPU_FLAG(pni, true, AC_DEFINE([SILC_CPU_SSE3], [], [SILC_CPU_SSE3]), [])
163     SILC_CPU_FLAG(ssse3, true, AC_DEFINE([SILC_CPU_SSSE3], [], [SILC_CPU_SSSE3]), [])
164     SILC_CPU_FLAG(sse4, true, AC_DEFINE([SILC_CPU_SSE4], [], [SILC_CPU_SSE4]), [])
165     ;;
166
167   # PowerPC, 32-bit and 64-bit CPUs
168   powerpc*)
169     cpu_ppc=true
170     ;;
171 esac
172 AM_CONDITIONAL(SILC_I386, test x$cpu_i386 = xtrue)
173 AM_CONDITIONAL(SILC_I486, test x$cpu_i486 = xtrue)
174 AM_CONDITIONAL(SILC_I586, test x$cpu_i586 = xtrue)
175 AM_CONDITIONAL(SILC_I686, test x$cpu_i686 = xtrue)
176 AM_CONDITIONAL(SILC_7686, test x$cpu_i786 = xtrue)
177 AM_CONDITIONAL(SILC_X86_64, test x$cpu_x86_64 = xtrue)
178 AM_CONDITIONAL(SILC_POWERPC, test x$cpu_ppc = xtrue)
179 AM_CONDITIONAL(SILC_IA64, test x$cpu_ia64 = xtrue)
180
181 if test x$want_cpu_optimizations = xtrue; then
182   # Set some compiler options based on CPU
183   if test "x$CC" = "xicc"; then
184     # ICC flags
185     if test x$x_have_cpu_sse4 = xtrue; then
186       SILC_ADD_CFLAGS(-axS)
187     fi
188     if test x$x_have_cpu_ssse3 = xtrue; then
189       SILC_ADD_CFLAGS(-axT)
190     elif test x$x_have_cpu_pni = xtrue; then
191       SILC_ADD_CFLAGS(-axP)
192     elif test x$x_have_cpu_sse2 = xtrue; then
193       SILC_ADD_CFLAGS(-axW)
194     fi
195   else
196     # Other compilers
197     if test x$x_have_cpu_sse2 = xtrue; then
198       SILC_ADD_CFLAGS(-msse2)
199     fi
200     if test x$x_have_cpu_pni = xtrue; then
201       SILC_ADD_CFLAGS(-msse3)
202     fi
203     if test x$x_have_cpu_ssse3 = xtrue; then
204       SILC_ADD_CFLAGS(-mssse3)
205     fi
206     if test x$x_have_cpu_sse4 = xtrue; then
207       SILC_ADD_CFLAGS(-msse4)
208     fi
209   fi
210 fi
211
212
213 ##
214 ## Put here any platform specific stuff
215 ##
216
217 case "$target" in
218   *-*-linux*)
219     CFLAGS=`echo $CFLAGS -D_GNU_SOURCE`
220     ;;
221   *-*-freebsd*)
222     ;;
223   *-*-netbsd*)
224     ;;
225   *-*-*bsd*)
226     ;;
227   *)
228     ;;
229 esac
230
231
232 ##
233 ## Header checking
234 ##
235 AC_HEADER_STDC
236
237 # More header checking
238 #
239 AC_CHECK_HEADERS(unistd.h assert.h time.h fcntl.h)
240 AC_CHECK_HEADERS(sys/types.h sys/times.h sys/time.h sys/resource.h)
241
242 # Check for big-endian machines
243 AC_C_BIGENDIAN
244
245
246 ##
247 ## Compiler and compiler flag checks
248 ##
249
250 # Disable all compiler optimizations
251 AC_MSG_CHECKING(whether to enable compiler optimizations)
252 AC_ARG_ENABLE(optimizations,
253   [  --disable-optimizations do not use any compiler optimizations],
254   [
255     AC_MSG_RESULT(no)
256     AC_DEFINE([SILC_NO_CC_OPTIMIZATIONS], [], [SILC_NO_CC_OPTIMIZATIONS])
257     want_cc_optimizations=false
258   ],
259   [
260     AC_MSG_RESULT(yes)
261     want_cc_optimizations=true
262   ])
263 AM_CONDITIONAL(SILC_NO_CC_OPTIMIZATIONS, test x$want_cc_optimizations = xfalse)
264
265 if test "$GCC"; then
266   # GCC specific options
267   if test "x$summary_debug" = "xyes"; then
268     SILC_ADD_CFLAGS(-g)
269   else
270     SILC_ADD_CFLAGS(-g)
271   fi
272   SILC_ADD_CFLAGS(-Wall -finline-functions)
273   SILC_ADD_CFLAGS(-Wno-pointer-sign)
274 else
275   # Other compilers
276   case "$target" in
277     alpha*-dec-osf*)
278       SILC_ADD_CFLAGS(-g3)
279       ;;
280     mips*-sgi-irix*)
281       SILC_ADD_CFLAGS(-g3)
282       ;;
283     *)
284       SILC_ADD_CFLAGS(-g)
285       ;;
286   esac
287
288   # Intel C++ Compiler flags
289   if test "x$CC" = "xicc"; then
290     SILC_ADD_CFLAGS(-restrict)
291     SILC_ADD_CFLAGS(-finline-functions)
292
293     # Don't define __GNUC__ except for system includes
294     SILC_ADD_CFLAGS(-gcc-sys)
295   fi
296 fi
297
298 if test x$want_cc_optimizations = xtrue; then
299   if test "$GCC"; then
300     # GCC specific options
301     if test "x$summary_debug" = "xyes"; then
302       SILC_ADD_CFLAGS(-O)
303     else
304       SILC_ADD_CFLAGS(-O2)
305     fi
306   else
307     # Other compilers
308     case "$target" in
309       alpha*-dec-osf*)
310         SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
311         ;;
312       mips*-sgi-irix*)
313         SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
314         ;;
315       *)
316         SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
317         ;;
318     esac
319   fi
320 fi
321
322 # Workaround a bug in GCC 2.x which causes memory exhaustion
323 # when compiling sha1 with optimizations on UltraSPARC.
324 FIX_SHA1='#'
325 if test "$GCC" -a "$host_cpu" = "sparc64"; then
326   AC_MSG_CHECKING(whether to enable GCC 2.x workaround for SHA1)
327   AC_TRY_COMPILE(
328     [
329       #if defined(__sparc64__) && (__GNUC__ == 2)
330       #else
331       choke me
332       #endif
333     ],
334     [],
335     [
336       FIX_SHA1=''
337       AC_MSG_RESULT(yes)
338     ],
339       AC_MSG_RESULT(no)
340     )
341 fi
342 AC_SUBST(FIX_SHA1)
343
344 ##
345 ## Function and libary checking
346 ##
347 AC_CHECK_FUNCS(times clock time)
348 AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid getrusage setsid)
349
350 cryptover=`echo $VERSION | sed 's/\./ /g'`
351 maj=0
352 min=0
353 bld=0
354 for v in $cryptover
355 do
356   if test $maj -eq 0; then
357     maj=$v
358     continue
359   fi
360   if test $min -eq 0; then
361     min=$v
362     continue
363   fi
364   if test $bld -eq 0; then
365     bld=$v
366     continue
367   fi
368 done
369 __CRYPTO_PACKAGE_VERSION="#define __SILC_CRYPTO_VERSION SILC_VERSION($maj,$min,$bld)"
370
371
372 ##
373 ##  Enable/disable checking
374 ##
375
376 #ifdef SILC_DIST_INPLACE
377 #
378 # Profiling options (never delivered to distributions)
379 #
380 AC_MSG_CHECKING(whether to enable gprof)
381 AC_ARG_ENABLE(gprof,
382   [  --enable-gprof          enable gprof profiling],
383   [
384     case "${enableval}" in
385       yes)
386         AC_MSG_RESULT(yes)
387         SILC_ADD_CFLAGS(-pg)
388         LIBS="$LIBS -pg"
389         ;;
390       *)
391         AC_MSG_RESULT(no)
392         ;;
393     esac
394   ],
395   [
396     AC_MSG_RESULT(no)
397   ])
398
399 AC_MSG_CHECKING(whether to enable gcov)
400 AC_ARG_ENABLE(gcov,
401   [  --enable-gcov           enable gcov],
402   [
403     case "${enableval}" in
404       yes)
405         AC_MSG_RESULT(yes)
406         SILC_ADD_CFLAGS(-fprofile-arcs)
407         LIBS="$LIBS -lgcov"
408         ;;
409       *)
410         AC_MSG_RESULT(no)
411         ;;
412     esac
413   ],
414   [
415     AC_MSG_RESULT(no)
416   ])
417 #endif SILC_DIST_INPLACE
418
419 # Debug checking
420 AC_MSG_CHECKING(whether to enable debugging)
421 summary_debug="no"
422 AC_ARG_ENABLE(debug,
423   [  --enable-debug          enable debugging],
424   [
425     case "${enableval}" in
426       yes)
427         AC_MSG_RESULT(yes)
428         summary_debug="yes"
429         ;;
430       *)
431         AC_MSG_RESULT(no)
432         ;;
433     esac
434   ],
435   [
436     AC_MSG_RESULT(no)
437   ])
438
439 # Disable all assembler optimizations
440 AC_MSG_CHECKING(whether to enable assembler optimizations)
441 AC_ARG_ENABLE(asm,
442   [  --disable-asm           do not use assembler optimizations],
443   [
444     AC_MSG_RESULT(no)
445     AC_DEFINE([SILC_NO_ASM], [], [SILC_NO_ASM])
446     want_asm=false
447   ],
448   [
449     AC_MSG_RESULT(yes)
450     want_asm=true
451   ])
452 AM_CONDITIONAL(SILC_NO_ASM, test x$want_asm = xfalse)
453
454 # Check for assembler
455 SILC_ASSEMBLER=""
456 have_assembler=false
457 if test x$want_asm = xtrue; then
458   AC_PATH_PROG([NASM], [nasm], [no])
459   if test "x$NASM" != "xno"; then
460     if test x$cpu_x86_64 = xtrue; then
461       SILC_ASSEMBLER="$NASM -O2 -felf64"
462     else
463       SILC_ASSEMBLER="$NASM -O2 -felf"
464     fi
465     have_assembler=true
466   fi
467
468   AC_PATH_PROG([YASM], [yasm], [no])
469   if test "x$YASM" != "xno"; then
470     if test x$cpu_x86_64 = xtrue; then
471       SILC_ASSEMBLER="$YASM -Xgnu -felf64"
472     else
473       SILC_ASSEMBLER="$YASM -Xgnu -felf"
474     fi
475     have_assembler=true
476   fi
477 fi
478 AC_SUBST(SILC_ASSEMBLER)
479
480 ##
481 ##  With/without checkings
482 ##
483
484 LIBSUBDIR=lib
485 LDFLAGS="-L\$(silc_top_srcdir)/lib $LDFLAGS"
486
487 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silccrypt"
488 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcasn1"
489 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcacc"
490 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcskr"
491 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcmath"
492 #ifdef SILC_DIST_SSH
493 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcssh"
494 #endif SILC_DIST_SSH
495 #ifdef SILC_DIST_PGP
496 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcpgp"
497 #endif SILC_DIST_PGP
498 #ifdef SILC_DIST_PKIX
499 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcpkix"
500 #endif SILC_DIST_PKIX
501
502 # SILC Runtime Toolkit checking
503 AC_ARG_WITH(srt-includes,
504   [  --with-srt-includes=DIR  SILC Runtime Toolkit includes [search in DIR]],
505   [ac_srt_includes="$withval"], [ac_srt_includes="no"])
506 AC_ARG_WITH(srt-libs,
507   [  --with-srt-libs=DIR      SILC Runtime Toolkit libraries [search in DIR]],
508   [ac_srt_libs="$withval"], [ac_srt_libs="no"])
509
510 if test -n "$with_srt_includes" || test -n "$with_srt_libs"; then
511   # Manually provided libs
512   if test "$ac_srt_includes" != "no"; then
513     SILC_LIB_INCLUDES="-I$ac_srt_includes"
514   fi
515   if test "$ac_srt_libs" != "no"; then
516     LDFLAGS="-L$ac_srt_libs $LDFLAGS"
517   fi
518
519   # Check libs to link against
520   f=`$EGREP __SILC_HAVE_PTHREAD $ac_srt_includes/silc.h`
521   if test -n "$f"; then
522     LIBS="$LIBS -lpthread"
523     has_threads=true
524   fi
525 else
526   # pkg-config check
527   PKG_CHECK_MODULES(SRT, [srt >= 1.2])
528   LIBS="$SRT_LIBS $LIBS"
529   CFLAGS="$CFLAGS $SRT_CFLAGS"
530 fi
531
532 # MP library checking. First check whether user wants to use GMP and use
533 # it if found. If not or not defined then compile the default library in the
534 # source tree.
535 #
536 mp_gmp=false
537 SAVE_LIBS="$LIBS"
538 SAVE_CFLAGS="$CFLAGS"
539 SAVE_LDFLAGS="$LDFLAGS"
540 AC_MSG_CHECKING(whether to search for GMP)
541 AC_ARG_WITH(gmp,
542   [[  --with-gmp[=DIR]        use GMP instead of SILC Math [search in DIR/lib and DIR/include]]],
543   [
544     case "$withval" in
545       no)
546         AC_MSG_RESULT(no)
547         ;;
548       *)
549         AC_MSG_RESULT(yes)
550
551         if test -d "$withval/include"; then
552           CFLAGS="$CFLAGS -I$withval/include"
553         fi
554         if test -d "$withval/lib"; then
555           LDFLAGS="$LDFLAGS -L$withval/lib"
556         fi
557
558         LIBS="-lgmp $LIBS"
559         ;;
560     esac
561
562     AC_CHECK_LIB(gmp, __gmpz_init,
563       [
564         mp_gmp=true
565         AC_DEFINE([SILC_MP_GMP], [], [GMP])
566         AC_MSG_RESULT(Using GMP as a MP library.)
567       ],
568       [
569         LIBS="$SAVE_LIBS"
570         CFLAGS="$SAVE_CFLAGS"
571         LDFLAGS="$SAVE_LDFLAGS"
572       ])
573   ],
574     AC_MSG_RESULT(no)
575   )
576
577 AM_CONDITIONAL(SILC_MP_GMP, test x$mp_gmp = xtrue)
578 AM_CONDITIONAL(SILC_MP_SILCMATH, test x$mp_gmp = xfalse)
579 if test x$mp_gmp = xfalse; then
580   AC_DEFINE([SILC_MP_SILCMATH], [], [SILCMATH])
581   AC_MSG_RESULT(Using SILC Math as a MP library.)
582 fi
583
584
585 ##
586 ## Native WIN32 compilation under cygwin
587 ##
588 AC_MSG_CHECKING(whether to compile native WIN32 code)
589 AC_ARG_WITH(win32,
590   [  --with-win32            compile native WIN32 (MinGW) code (-mno-cygwin)],
591   [
592     AC_MSG_RESULT(yes)
593     AC_DEFINE([SILC_WIN32], [], [SILC_WIN32])
594     win32_support=true
595     CFLAGS="-mno-cygwin $CFLAGS"
596     LIBS="$LIBS -lwsock32"
597   ],
598   [
599     AC_MSG_RESULT(no)
600     win32_support=false
601   ])
602 AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
603
604
605 ##
606 ## Include configure fragments
607 ##
608 AD_INCLUDE_CONFIGURE
609
610
611 ##
612 ## Outputs and substitutions
613 ##
614
615 AC_SUBST(LIBSUBDIR)
616 AC_SUBST(SILC_TOP_SRCDIR)
617 AC_SUBST(LDFLAGS)
618 AC_SUBST(LIBS)
619 AC_SUBST(SILC_LIB_INCLUDES)
620 AC_SUBST(__CRYPTO_PACKAGE_VERSION)
621
622 # Native Symbian OS support (disabled by default)
623 AM_CONDITIONAL(SILC_SYMBIAN, test xfalse = xtrue)
624
625 # Make enable-shared aware
626 AM_CONDITIONAL(SILC_ENABLE_SHARED, test "$enable_shared" = yes)
627
628 ETCDIR=`eval echo $sysconfdir`;ETCDIR=`eval echo $ETCDIR`
629 AC_SUBST(ETCDIR)
630 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
631
632 DOCDIR=`eval echo $docdir`;DOCDIR=`eval echo $DOCDIR`
633 AC_SUBST(DOCDIR)
634 AC_DEFINE_UNQUOTED([SILC_DOCDIR], "$DOCDIR", [SILC_DOCDIR])
635
636 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
637 AC_SUBST(INCLUDE_DEFINES_INT)
638
639
640 #
641 # Makefile outputs
642 #
643 AC_CONFIG_FILES(
644 Makefile
645 doc/Makefile
646 Makefile.defines
647 Makefile.defines_int
648 includes/Makefile
649 apps/Makefile
650 win32/Makefile
651 )
652
653 AC_CONFIG_FILES(
654 lib/Makefile
655 lib/silccrypt/Makefile
656 lib/silccrypt/silccrypto.h
657 lib/silccrypt/tests/Makefile
658 lib/silcasn1/Makefile
659 lib/silcasn1/tests/Makefile
660 lib/silcacc/Makefile
661 lib/silcacc/tests/Makefile
662 #ifdef SILC_DIST_SSH
663 lib/silcssh/Makefile
664 lib/silcssh/tests/Makefile
665 #endif SILC_DIST_SSH
666 #ifdef SILC_DIST_PGP
667 lib/silcpgp/Makefile
668 lib/silcpgp/tests/Makefile
669 #endif SILC_DIST_PGP
670 #ifdef SILC_DIST_PKIX
671 lib/silcpkix/Makefile
672 lib/silcpkix/tests/Makefile
673 #endif SILC_DIST_PKIX
674 lib/silcskr/Makefile
675 lib/silcskr/tests/Makefile
676 lib/silcmath/Makefile
677 lib/sct.pc
678 )
679
680 AC_OUTPUT
681
682 ##
683 ## Summary output
684 ##
685
686 s_bindir=`eval echo $bindir`;s_bindir=`eval echo $s_bindir`
687 s_sbindir=`eval echo $sbindir`;s_sbindir=`eval echo $s_sbindir`
688 s_mandir=`eval echo $mandir`;s_mandir=`eval echo $s_mandir`
689 s_includedir=`eval echo $includedir`;s_includedir=`eval echo $s_includedir`
690
691 echo ""
692 echo "SILC Crypto Toolkit configuration summary:"
693 echo "-----------------------------------------"
694 echo " Target host ...................: $target"
695 echo " Compiler ......................: $CC"
696 echo " CFLAGS ........................: $CFLAGS"
697 echo " LDFLAGS .......................: $LDFLAGS"
698 echo " LIBS ..........................: $LIBS"
699 echo ""
700 echo " Installation prefix ...........: $prefix"
701 echo " bin directory .................: $s_bindir"
702 echo " sbin directory ................: $s_sbindir"
703 echo " etc directory .................: $ETCDIR"
704 echo " man directory .................: $s_mandir"
705 echo " doc directory .................: $DOCDIR"
706 echo " include directory .............: $s_includedir"
707 echo ""
708
709 if test x$mp_gmp = xtrue; then
710   echo " Arithmetic library ............: GMP"
711 fi
712
713 if test x$want_asm = xfalse; then
714   summary_asm="no"
715 else
716   summary_asm="yes"
717 fi
718 echo " Assembler optimizations .......: $summary_asm"
719
720 if test x$want_cc_optimizations = xfalse; then
721   summary_cc_opt="no"
722 else
723   summary_cc_opt="yes"
724 fi
725 echo " Compiler optimizations ........: $summary_cc_opt"
726
727 if test x$want_cpu_optimizations = xfalse; then
728   summary_cpu_opt="no"
729 else
730   summary_cpu_opt="yes"
731 fi
732 echo " CPU feature optimizations .....: $summary_cpu_opt"
733
734 threads="no"
735 if test x$has_threads = xtrue; then
736   threads="yes"
737 fi
738 echo " Multi-threads support .........: $threads"
739 echo " Debugging enabled .............: $summary_debug"
740 echo ""
741 echo "Compile the sources with 'make' or 'gmake' command."