Added __SILC_HAVE_PTHREAD, __SILC_HAVE_SIM, __SILC_HAVE_LIBIDN,
[silc.git] / configure.in.pre
1 #
2 #  configure.in.pre
3 #
4 #  Author: Pekka Riikonen <priikone@silcnet.org>
5 #
6 #  Copyright (C) 2000 - 2005 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 AC_INIT(includes/silcversion.h)
19
20 # Put here any platform specific stuff
21 #
22 AC_CANONICAL_SYSTEM
23 case "$target" in
24   *-*-freebsd*)
25     check_threads=true
26     ;;
27   *-*-*bsd*)
28     check_threads=false
29     ;;
30   *)
31     check_threads=true
32     ;;
33 esac
34
35 # ./prepare script will automatically put the correct version. Do not edit!
36 #
37 AM_INIT_AUTOMAKE(SILC_PACKAGE, SILC_VERSION)
38 AC_PREREQ(2.52)
39 AC_CONFIG_HEADERS(includes/silcdefs.h)
40
41 CFLAGS=
42 AC_PROG_CC
43 AC_C_INLINE
44 AC_C_CONST
45
46 AC_PROG_LN_S
47 AC_SUBST(LN_S)
48
49 ##
50 ## Distribution definition. ./prepare will automatically add here a correct
51 ## value. Do not edit!
52 ##
53 silc_dist=SILC_PACKAGE
54 SILC_DIST_SUBDIRS="SILC_DISTRIBUTION_SUBDIRS"
55 AC_DEFINE(SILC_DIST_DEFINE)
56
57
58 ##
59 ## Library versioning.
60 ##
61 # Do the releases and library versioning according to following rules:
62 #
63 #  - If any code has changed in library, increment [LIB]_REVISION
64 #  - If functions were added, set [LIB]_REVISION to 0
65 #  - If functions were added, removed or changed, increment [LIB]_CURRENT
66 #  - If functions were added, increment [LIB]_AGE
67 #  - If functions were removed, set [LIB]_AGE to 0
68 #
69 # where [LIB] is LIBSILC and LIBSILCCLIENT, and where "functions" means
70 # functions public interfaces.
71 #
72 # The LIB_BASE_VERSION defines the SILC software major.minor version and
73 # it is increment only when these version numbers actually change.
74 #
75
76 # Base version for libraries.  Do not change this unless SILC version
77 # changes too.
78 LIB_BASE_VERSION=1.0
79
80 # libsilc versions
81 LIBSILC_CURRENT=3
82 LIBSILC_REVISION=0
83 LIBSILC_AGE=2
84
85 # libsilcclient versions
86 LIBSILCCLIENT_CURRENT=3
87 LIBSILCCLIENT_REVISION=0
88 LIBSILCCLIENT_AGE=2
89
90 # Substitute the version numbers
91 AC_SUBST(LIB_BASE_VERSION)
92 AC_SUBST(LIBSILC_CURRENT)
93 AC_SUBST(LIBSILC_REVISION)
94 AC_SUBST(LIBSILC_AGE)
95 AC_SUBST(LIBSILCCLIENT_CURRENT)
96 AC_SUBST(LIBSILCCLIENT_REVISION)
97 AC_SUBST(LIBSILCCLIENT_AGE)
98
99 #
100 # Program checking
101 #
102 AC_PROG_INSTALL
103 AC_PROG_RANLIB
104 AC_PROG_MAKE_SET
105 AC_DISABLE_SHARED
106 AC_PROG_LIBTOOL
107 AC_PATH_PROG(sedpath, sed)
108
109 # Header checking
110 #
111 AC_HEADER_STDC
112 AC_HEADER_TIME
113 AC_HEADER_STAT
114
115 # More header checking
116 #
117 AC_CHECK_HEADERS(unistd.h string.h getopt.h errno.h fcntl.h assert.h)
118 AC_CHECK_HEADERS(sys/types.h sys/stat.h sys/time.h stddef.h)
119 AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h xti.h netdb.h)
120 AC_CHECK_HEADERS(pwd.h grp.h termcap.h paths.h)
121 AC_CHECK_HEADERS(ncurses.h signal.h ctype.h utime.h)
122 AC_CHECK_HEADERS(arpa/inet.h sys/mman.h limits.h termios.h locale.h langinfo.h)
123
124 # Data type checking
125 #
126 AC_TYPE_SIGNAL
127 AC_TYPE_SIZE_T
128 AC_TYPE_MODE_T
129 AC_TYPE_UID_T
130 AC_TYPE_PID_T
131
132 AC_CHECK_SIZEOF(long long, 0)
133 AC_SUBST(SILC_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long)
134 AC_CHECK_SIZEOF(long, 0)
135 AC_SUBST(SILC_SIZEOF_LONG, $ac_cv_sizeof_long)
136 AC_CHECK_SIZEOF(int, 0)
137 AC_SUBST(SILC_SIZEOF_INT, $ac_cv_sizeof_int)
138 AC_CHECK_SIZEOF(short, 0)
139 AC_SUBST(SILC_SIZEOF_SHORT, $ac_cv_sizeof_short)
140 AC_CHECK_SIZEOF(char, 0)
141 AC_SUBST(SILC_SIZEOF_CHAR, $ac_cv_sizeof_char)
142 AC_CHECK_SIZEOF(void *, 0)
143 AC_SUBST(SILC_SIZEOF_VOID_P, $ac_cv_sizeof_void_p)
144
145 # Function and library checking
146 #
147 AC_CHECK_FUNC(gethostbyname, [],
148   [
149     AC_CHECK_LIB(nsl, gethostbyname, LIBS="$LIBS -lnsl")
150     AC_CHECK_FUNC(res_gethostbyname, [],
151        AC_CHECK_LIB(resolv, res_gethostbyname, LIBS="$LIBS -lresolv")
152     )
153   ])
154 AC_CHECK_FUNC(socket, [],
155   AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
156 )
157 AC_CHECK_FUNCS(gethostname gethostbyaddr getservbyname getservbyport)
158 AC_CHECK_FUNCS(select listen bind shutdown close connect setsockopt)
159 AC_CHECK_FUNCS(time ctime utime gettimeofday)
160 AC_CHECK_FUNCS(chmod fcntl stat fstat getenv putenv strerror)
161 AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid)
162 AC_CHECK_FUNCS(setgroups initgroups nl_langinfo)
163 AC_CHECK_FUNCS(strchr strstr strcpy strncpy memcpy memset memmove)
164
165 # SIM support checking
166 # XXX These needs to be changed as more supported platforms appear.
167 # XXX This probably needs to be made platform dependant check.
168 #
169 sim_support=false
170 AC_MSG_CHECKING(for SIM support)
171 AC_MSG_RESULT()
172 AC_CHECK_HEADERS(dlfcn.h,
173   [
174     AC_CHECK_LIB(dl, dlopen,
175       [
176         AC_DEFINE(SILC_SIM)
177         sim_support=true
178         LIBS="$LIBS -ldl"
179       ],
180       [
181         AC_CHECK_LIB(c, dlopen,
182           [
183             AC_DEFINE(SILC_SIM)
184             sim_support=true
185           ])
186       ])
187    ])
188
189 __SILC_HAVE_SIM=""
190 AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue)
191 if test x$sim_support = xtrue; then
192   AC_MSG_RESULT(Enabled SIM support.)
193   __SILC_HAVE_SIM="#define __SILC_HAVE_SIM 1"
194 else
195   AC_MSG_RESULT(No SIM support found.)
196 fi
197
198 # lib/contrib conditionals
199 #
200 AC_CHECK_HEADER(regex.h,
201   [
202     AC_DEFINE(HAVE_REGEX)
203     have_regex=1
204   ], have_regex=0
205 )
206 AM_CONDITIONAL(HAVE_REGEX, test x$have_regex = x1)
207
208 AC_CHECK_FUNC(getopt_long,
209   [
210     AC_DEFINE(HAVE_GETOPT_LONG)
211     have_getopt_long=1
212   ], have_getopt_long=0
213 )
214 AM_CONDITIONAL(HAVE_GETOPT_LONG, test x$have_getopt_long = x1)
215
216 ##
217 ##  Enable/disable checking
218 ##
219
220 # IPv6 support
221 #
222 AC_MSG_CHECKING(whether to enable IPv6 support)
223 AC_ARG_ENABLE(ipv6,
224   [  --enable-ipv6           enable IPv6 support],
225   [
226     case "${enableval}" in
227       yes)
228         want_ipv6=true
229         check_ipv6=false
230         summary_ipv6="yes"
231         AC_DEFINE(HAVE_IPV6)
232         AC_MSG_RESULT(yes)
233         ;;
234       *)
235         want_ipv6=false
236         check_ipv6=false
237         summary_ipv6="no"
238         AC_MSG_RESULT(no)
239         ;;
240     esac
241   ],
242     check_ipv6=true
243   )
244
245 if test x$check_ipv6 = xtrue; then
246   summary_ipv6="no"
247   AC_TRY_COMPILE(
248     [
249       #ifdef HAVE_SYS_TYPES_H
250       #include <sys/types.h>
251       #endif
252       #ifdef HAVE_NETINET_TCP_H
253       #include <netinet/tcp.h>
254       #endif
255       #ifdef HAVE_NETDB_H
256       #include <netdb.h>
257       #endif
258       #include <sys/socket.h>
259       #ifdef HAVE_NETINET_IN_H
260       #include <netinet/in.h>
261       #endif
262     ],
263     [
264       struct sockaddr_in6 sin6;
265       int family = AF_INET6;
266     ],
267     [
268       AC_DEFINE(HAVE_IPV6)
269       AC_MSG_RESULT(yes)
270       summary_ipv6="yes"
271     ],
272       AC_MSG_RESULT(no)
273     )
274 fi
275
276 # Debug checking
277 #
278 AC_MSG_CHECKING(whether to enable debugging)
279 summary_debug="no"
280 __SILC_ENABLE_DEBUG=""
281 AC_ARG_ENABLE(debug,
282   [  --enable-debug          enable debugging],
283   [
284     case "${enableval}" in
285       yes)
286         AC_MSG_RESULT(yes)
287         AC_DEFINE(SILC_DEBUG)
288         summary_debug="yes"
289         __SILC_ENABLE_DEBUG="#define __SILC_ENABLE_DEBUG 1"
290         ;;
291       *)
292         AC_MSG_RESULT(no)
293         ;;
294     esac
295   ],
296   [
297     AC_MSG_RESULT(no)
298   ])
299
300 # Stack trace checking
301 #
302 AC_MSG_CHECKING(whether to enable stack tracing)
303 summary_stacktrace="no"
304 AC_ARG_ENABLE(stack-trace,
305   [  --enable-stack-trace    enable memory stack trace],
306   [
307     case "${enableval}" in
308     yes)
309       AC_MSG_RESULT(yes)
310       AC_DEFINE(SILC_STACKTRACE)
311       summary_stacktrace="yes"
312       ;;
313     *)
314       AC_MSG_RESULT(no)
315       ;;
316     esac
317   ],
318     AC_MSG_RESULT(no)
319   )
320
321 # Disable all assembler optimizations
322 #
323 AC_MSG_CHECKING(whether to enable assembler optimizations)
324 want_asm=true
325 AC_ARG_ENABLE(asm,
326   [  --disable-asm           do not use assembler optimizations],
327   [
328     AC_MSG_RESULT(no)
329     want_asm=false
330   ],
331   [
332     AC_MSG_RESULT(yes)
333     want_asm=true
334   ])
335
336
337 ##
338 ## Compiler and compiler flag checks
339 ##
340
341 # Function to check if compiler flag works
342 # Usage: SILC_ADD_CFLAGS(FLAGS, [ACTION-IF-FAILED])
343 AC_DEFUN([SILC_ADD_CFLAGS],
344 [ tmp_CFLAGS="$CFLAGS"
345   CFLAGS="$CFLAGS $1"
346   AC_MSG_CHECKING(whether $CC accepts $1 flag)
347   AC_TRY_LINK([], [], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
348                                        CFLAGS="$tmp_CFLAGS"
349                                        $2])
350   unset tmp_CFLAGS
351 ])
352
353 if test "$GCC"; then
354   # GCC specific options
355   if test "x$summary_debug" = "xyes"; then
356     SILC_ADD_CFLAGS(-g -O)
357   else
358     SILC_ADD_CFLAGS(-g -O2)
359   fi
360   SILC_ADD_CFLAGS(-Wall -finline-functions)
361 else
362   # Other compilers
363   case "$target" in
364     alpha*-dec-osf*)
365       SILC_ADD_CFLAGS(-g3 -O2, SILC_ADD_CFLAGS(-g3 -O, SILC_ADD_CFLAGS(-O)))
366       ;;
367     *)
368       SILC_ADD_CFLAGS(-g)
369       SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
370       ;;
371   esac
372
373   # Intel C++ Compiler needs -restrict
374   if test "x$CC" = "xicc"; then
375     SILC_ADD_CFLAGS(-restrict)
376   fi
377 fi
378
379 #
380 # Workaround a bug in GCC 2.x which causes memory exhaustion
381 # when compiling sha1 with optimizations on UltraSPARC.
382 #
383 FIX_SHA1='#'
384 if test "$GCC" -a "$host_cpu" = "sparc64"; then
385   AC_MSG_CHECKING(whether to enable GCC 2.x workaround for SHA1)
386   AC_TRY_COMPILE(
387     [
388       #if defined(__sparc64__) && (__GNUC__ == 2)
389       #else
390       choke me
391       #endif
392     ],
393     [],
394     [
395       FIX_SHA1=''
396       AC_MSG_RESULT(yes)
397     ],
398       AC_MSG_RESULT(no)
399     )
400 fi
401 AC_SUBST(FIX_SHA1)
402
403 ##
404 ##  Installation
405 ##
406
407 # Default installation destination
408 #
409 AC_PREFIX_DEFAULT(/usr/local/silc)
410 if test "x$prefix" != xNONE; then
411   silc_prefix="$prefix"
412 else
413   silc_prefix="$ac_default_prefix"
414 fi
415
416 # etc directory
417 #
418 if test "x$sysconfdir" != 'x${prefix}/etc'; then
419   ETCDIR="$sysconfdir"
420 else
421   ETCDIR="$silc_prefix/etc"
422 fi
423
424 AC_ARG_WITH(etcdir,
425   [[  --with-etcdir=DIR       directory for system files [/etc/silc]]],
426   [
427     case "$withval" in
428       no|yes)
429         ;;
430       *)
431         ETCDIR="$withval"
432         ;;
433     esac
434   ])
435 AC_SUBST(ETCDIR)
436 AC_DEFINE_UNQUOTED(SILC_ETCDIR, "$ETCDIR")
437
438 # help directory
439 #
440 HELPDIR="$silc_prefix/help"
441 AC_ARG_WITH(helpdir,
442   [[  --with-helpdir=DIR      directory for SILC help files [PREFIX/help]]],
443   [
444     case "$withval" in
445       no|yes)
446         ;;
447       *)
448        HELPDIR="$withval"
449        ;;
450     esac
451   ])
452 AC_SUBST(HELPDIR)
453 AC_DEFINE_UNQUOTED(SILC_HELPDIR, "$HELPDIR")
454
455 # doc directory
456 #
457 DOCDIR="$silc_prefix/doc"
458 AC_ARG_WITH(docdir,
459   [[  --with-docdir=DIR       directory for SILC documentation [PREFIX/doc]]],
460   [
461     case "$withval" in
462       no|yes)
463         ;;
464       *)
465         DOCDIR="$withval"
466         ;;
467     esac
468   ])
469 AC_SUBST(DOCDIR)
470 AC_DEFINE_UNQUOTED(SILC_DOCDIR, "$DOCDIR")
471
472 # SIM modules directory
473 #
474 MODULESDIR="$silc_prefix/modules"
475 AC_ARG_WITH(simdir,
476   [[  --with-simdir=DIR       directory for SIM modules [PREFIX/modules]]],
477   [
478     case "$withval" in
479       no|yes)
480         ;;
481       *)
482         MODULESDIR="$withval"
483         ;;
484     esac
485   ])
486 AC_SUBST(MODULESDIR)
487 AC_DEFINE_UNQUOTED(SILC_MODULESDIR, "$MODULESDIR")
488
489 # Logs directory
490 #
491 LOGSDIR="$silc_prefix/logs"
492 AC_ARG_WITH(logsdir,
493   [[  --with-logsdir=DIR      directory for SILC Server logs [PREFIX/logs]]],
494   [
495     case "$withval" in
496       no|yes)
497         ;;
498       *)
499         LOGSDIR="$withval"
500         ;;
501     esac
502   ])
503 AC_SUBST(LOGSDIR)
504 AC_DEFINE_UNQUOTED(SILC_LOGSDIR, "$LOGSDIR")
505
506 # silcd config file checking
507 #
508 summary_silcd_configfile="/etc/silc/silcd.conf"
509 AC_ARG_WITH(silcd-config-file,
510   [[  --with-silcd-config-file=FILE  use FILE as default configuration file
511                                  for SILC Server [/etc/silc/silcd.conf]]],
512     AC_DEFINE_UNQUOTED(SILC_SERVER_CONFIG_FILE, "$withval")
513     summary_silcd_configfile="$withval"
514   )
515
516 # silcd pid file checking
517 #
518 if test "x$localstatedir" != 'x${prefix}/var'; then
519   PIDFILE="$localstatedir/silcd.pid"
520 else
521   PIDFILE="$silc_prefix/var/silcd.pid"
522 fi
523
524 AC_ARG_WITH(silcd-pid-file,
525   [[  --with-silcd-pid-file=FILE     use FILE as default pid file for SILC
526                                  Server [/var/run/silcd.pid]]],
527   [
528     case "$withval" in
529       no|yes)
530         ;;
531       *)
532         PIDFILE="$withval"
533         ;;
534     esac
535   ])
536 AC_SUBST(PIDFILE)
537
538
539 ##
540 ##  With/without checkings
541 ##
542
543 # SOCKS4 support checking
544 #
545 SAVE_LIBS="$LIBS"
546 SAVE_CFLAGS="$CFLAGS"
547 SAVE_LDFLAGS="$LDFLAGS"
548 AC_MSG_CHECKING(whether to support SOCKS4)
549 AC_ARG_WITH(socks4,
550   [[  --with-socks4[=DIR]     with SOCKS4 support [search in DIR/lib and DIR/include]]],
551   [
552     case "$withval" in
553       no)
554         AC_MSG_RESULT(no)
555         ;;
556       *)
557         AC_MSG_RESULT(yes)
558         socks=4
559
560         if test -d "$withval/include"; then
561           CFLAGS="$CFLAGS -I$withval/include"
562         fi
563         if test -d "$withval/lib"; then
564           LDFLAGS="$LDFLAGS -L$withval/lib"
565         fi
566
567         LIBS="-lsocks $LIBS"
568         ;;
569     esac
570
571     AC_TRY_LINK([],
572       [
573         Rconnect();
574       ], [],
575       [
576         AC_MSG_ERROR(Could not find SOCKS4 library.)
577         LIBS="$SAVE_LIBS"
578         CFLAGS="$SAVE_CFLAGS"
579         LDFLAGS="$SAVE_LDFLAGS"
580       ])
581   ],
582     AC_MSG_RESULT(no)
583   )
584
585 # SOCKS5 support checking
586 #
587 SAVE_LIBS="$LIBS"
588 SAVE_CFLAGS="$CFLAGS"
589 SAVE_LDFLAGS="$LDFLAGS"
590 AC_MSG_CHECKING(whether to support SOCKS5)
591 AC_ARG_WITH(socks5,
592   [[  --with-socks5[=DIR]     with SOCKS5 support [search in DIR/lib and DIR/include]]],
593   [
594     case "$withval" in
595       no)
596         AC_MSG_RESULT(no)
597         ;;
598       *)
599         AC_MSG_RESULT(yes)
600         socks=5
601
602         if test -d "$withval/include"; then
603           CFLAGS="$CFLAGS -I$withval/include"
604         fi
605         if test -d "$withval/lib"; then
606           LDFLAGS="$LDFLAGS -L$withval/lib"
607         fi
608
609         LIBS="-lsocks5 $LIBS"
610         ;;
611     esac
612
613     AC_TRY_LINK([],
614       [
615         SOCKSconnect();
616       ], [],
617       [
618         AC_MSG_ERROR(Could not find SOCKS5 library.)
619         LIBS="$SAVE_LIBS"
620         CFLAGS="$SAVE_CFLAGS"
621         LDFLAGS="$SAVE_LDFLAGS"
622       ])
623   ],
624     AC_MSG_RESULT(no)
625   )
626
627 if test "x$socks" = "x4"; then
628   AC_DEFINE(SOCKS)
629   CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
630 fi
631
632 if test "x$socks" = "x5"; then
633   AC_DEFINE(SOCKS)
634   AC_DEFINE(SOCKS5)
635   AC_DEFINE(Rconnect, SOCKSconnect)
636   AC_DEFINE(Rgetsockname, SOCKSgetsockname)
637   AC_DEFINE(Rgetpeername, SOCKSgetpeername)
638   AC_DEFINE(Rbind, SOCKSbind)
639   AC_DEFINE(Raccept, SOCKSaccept)
640   AC_DEFINE(Rlisten, SOCKSlisten)
641   AC_DEFINE(Rselect, SOCKSselect)
642   AC_DEFINE(Rrecvfrom, SOCKSrecvfrom)
643   AC_DEFINE(Rsendto, SOCKSsendto)
644   AC_DEFINE(Rrecv, SOCKSrecv)
645   AC_DEFINE(Rsend, SOCKSsend)
646   AC_DEFINE(Rread, SOCKSread)
647   AC_DEFINE(Rwrite, SOCKSwrite)
648   AC_DEFINE(Rrresvport, SOCKSrresvport)
649   AC_DEFINE(Rshutdown, SOCKSshutdown)
650   AC_DEFINE(Rlisten, SOCKSlisten)
651   AC_DEFINE(Rclose, SOCKSclose)
652   AC_DEFINE(Rdup, SOCKSdup)
653   AC_DEFINE(Rdup2, SOCKSdup2)
654   AC_DEFINE(Rfclose, SOCKSfclose)
655   AC_DEFINE(Rgethostbyname, SOCKSgethostbyname)
656 fi
657
658 # MP library checking. First check whether user wants to use GMP and use
659 # it if found. If not or not defined then compile the MPI library in the
660 # source tree.
661 #
662 mp_gmp=false
663 SAVE_LIBS="$LIBS"
664 SAVE_CFLAGS="$CFLAGS"
665 SAVE_LDFLAGS="$LDFLAGS"
666 AC_MSG_CHECKING(whether to search for GMP)
667 AC_ARG_WITH(gmp,
668   [[  --with-gmp[=DIR]        use GMP instead of MPI [search in DIR/lib and DIR/include]]],
669   [
670     case "$withval" in
671       no)
672         AC_MSG_RESULT(no)
673         ;;
674       *)
675         AC_MSG_RESULT(yes)
676
677         if test -d "$withval/include"; then
678           CFLAGS="$CFLAGS -I$withval/include"
679         fi
680         if test -d "$withval/lib"; then
681           LDFLAGS="$LDFLAGS -L$withval/lib"
682         fi
683
684         LIBS="-lgmp $LIBS"
685         ;;
686     esac
687
688     AC_CHECK_LIB(gmp, __gmpz_init,
689       [
690         mp_gmp=true
691         AC_DEFINE(SILC_MP_GMP)
692         AC_MSG_RESULT(Using GMP as a MP library.)
693       ],
694       [
695         LIBS="$SAVE_LIBS"
696         CFLAGS="$SAVE_CFLAGS"
697         LDFLAGS="$SAVE_LDFLAGS"
698       ])
699   ],
700     AC_MSG_RESULT(no)
701   )
702
703 AM_CONDITIONAL(SILC_MP_GMP, test x$mp_gmp = xtrue)
704 AM_CONDITIONAL(SILC_MP_NSS_MPI, test x$mp_gmp = xfalse)
705 if test x$mp_gmp = xfalse; then
706   AC_DEFINE(SILC_MP_NSS_MPI)
707   AC_MSG_RESULT(Using NSS MPI as a MP library.)
708 fi
709
710 # GNU Libidn (for stringprep) support
711 #
712 check_libidn=true
713 has_libidn=false
714 SAVE_LIBS="$LIBS"
715 SAVE_CFLAGS="$CFLAGS"
716 SAVE_LDFLAGS="$LDFLAGS"
717 SAVE_CPPFLAGS="$CPPFLAGS"
718 AC_MSG_CHECKING(whether to implicit search for libidn)
719 AC_ARG_WITH(libidn,
720   [[  --with-libidn[=DIR]     use libidn [search in DIR/include and DIR/lib]]],
721   [
722     case "${withval}" in
723       no)
724         AC_MSG_RESULT(no)
725         AC_CHECK_HEADERS(stringprep.h,
726           [
727             AC_CHECK_FUNC(stringprep, has_libidn=true)
728           ])
729         check_libidn=false
730         ;;
731       *)
732         AC_MSG_RESULT(yes)
733         if test -d $withval/include; then
734           CPPFLAGS="$CPPFLAGS -I$withval/include"
735           CFLAGS="$CFLAGS -I$withval/include"
736         fi
737         if test -d $withval/lib; then
738           LDFLAGS="$LDFLAGS -L$withval/lib"
739         fi
740         ;;
741     esac
742   ],
743   [
744     AC_MSG_RESULT(no)
745     AC_CHECK_HEADERS(stringprep.h,
746       [
747         AC_CHECK_FUNCS(stringprep,
748           [
749             has_libidn=true
750             check_libidn=false
751           ])
752       ])
753   ])
754
755 if test x$check_libidn = xtrue; then
756   AC_MSG_RESULT(Searching for libidn...)
757
758   AC_CHECK_HEADERS(stringprep.h,
759     [
760       LIBS="$LIBS -lidn"
761       AC_MSG_CHECKING(for stringprep in -lidn)
762       AC_TRY_LINK(
763         [
764           #include <stdlib.h>
765           #include <stringprep.h>
766         ],
767         [
768           (void)stringprep_locale_charset();
769         ],
770         [
771           echo "yes"
772           AC_DEFINE(HAVE_LIBIDN, 1, [Define if you have the stringprep() function.])
773           has_libidn=true
774           check_libidn=false
775         ],
776         [
777           echo "no"
778           LIBS="$SAVE_LIBS"
779           CFLAGS="$SAVE_CFLAGS"
780           LDFLAGS="$SAVE_LDFLAGS"
781           CPPFLAGS="$SAVE_CPPFLAGS"
782         ])
783      ])
784 fi
785
786 if test x$check_libidn = xtrue; then
787   # search for idn library..
788   SAVE_LIBS="$LIBS"
789   SAVE_CFLAGS="$CFLAGS"
790   SAVE_LDFLAGS="$LDFLAGS"
791   SAVE_CPPFLAGS="$CPPFLAGS"
792
793   for dir in `echo "/usr/local /usr/pkg /usr/contrib"`; do
794     if test x$has_libidn = xfalse; then
795       AC_MSG_RESULT(searching in $dir...)
796
797       if test -d $dir/include; then
798         CPPFLAGS="$CPPFLAGS -I$dir/include"
799         CFLAGS="$CFLAGS -I$dir/include"
800       fi
801       if test -d $dir/lib; then
802         LDFLAGS="$LDFLAGS -L$dir/lib"
803       fi
804
805       # XXX
806       unset ac_cv_header__stringprep_h_ ac_cv_header_stringprep_h || true
807
808       AC_CHECK_HEADERS(stringprep.h,
809         [
810           LIBS="$LIBS -lidn"
811           AC_MSG_CHECKING(for stringprep in -lidn)
812           AC_TRY_LINK(
813             [
814               #include <stdlib.h>
815               #include <stringprep.h>
816             ],
817             [
818               (void)stringprep_locale_charset();
819             ],
820             [
821               echo "yes"
822               has_libidn=true
823               AC_DEFINE(HAVE_LIBIDN, 1, [Define if you have the stringprep() function.])
824             ],
825             [
826               echo "no"
827               has_libidn=false
828
829               LIBS="$SAVE_LIBS"
830               CFLAGS="$SAVE_CFLAGS"
831               LDFLAGS="$SAVE_LDFLAGS"
832               CPPFLAGS="$SAVE_CPPFLAGS"
833             ])
834          ],
835          [
836            CFLAGS="$SAVE_CFLAGS"
837            LDFLAGS="$SAVE_LDFLAGS"
838            CPPFLAGS="$SAVE_CPPFLAGS"
839          ])
840       fi
841     done
842 fi
843
844 __SILC_HAVE_LIBIDN=""
845 if test x$has_libidn = xtrue; then
846   __SILC_HAVE_LIBIDN="#define __SILC_HAVE_LIBIDN 1"
847 fi
848
849 # iconv support
850 #
851 check_iconv=true
852 has_iconv=false
853 SAVE_LIBS="$LIBS"
854 SAVE_CFLAGS="$CFLAGS"
855 SAVE_LDFLAGS="$LDFLAGS"
856 SAVE_CPPFLAGS="$CPPFLAGS"
857 AC_MSG_CHECKING(whether to implicit search for libiconv)
858 AC_ARG_WITH(iconv,
859   [[  --with-iconv[=DIR]      use libiconv [search in DIR/include and DIR/lib]]],
860   [
861     case "${withval}" in
862       no)
863         AC_MSG_RESULT(no)
864         AC_CHECK_HEADERS(iconv.h,
865           [
866             AC_CHECK_FUNC(iconv, has_iconv=true)
867           ])
868         check_iconv=false
869         ;;
870       *)
871         AC_MSG_RESULT(yes)
872         if test -d $withval/include; then
873           CPPFLAGS="$CPPFLAGS -I$withval/include"
874           CFLAGS="$CFLAGS -I$withval/include"
875         fi
876         if test -d $withval/lib; then
877           LDFLAGS="$LDFLAGS -L$withval/lib"
878         fi
879         ;;
880     esac
881   ],
882   [
883     AC_MSG_RESULT(no)
884     AC_CHECK_HEADERS(iconv.h,
885       [
886         AC_CHECK_FUNCS(iconv,
887           [
888             has_iconv=true
889             check_iconv=false
890           ])
891       ])
892   ])
893
894 if test x$check_iconv = xtrue; then
895   AC_MSG_RESULT(Searching for iconv...)
896
897   # XXX
898   unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
899
900   AC_CHECK_HEADERS(iconv.h,
901     [
902       LIBS="$LIBS -liconv"
903       AC_MSG_CHECKING(for iconv in -liconv)
904       AC_TRY_LINK(
905         [
906           #include <stdlib.h>
907           #include <iconv.h>
908         ],
909         [
910           iconv_t cd = iconv_open("", "");
911           iconv(cd, NULL, NULL, NULL, NULL);
912           iconv_close(cd);
913         ],
914         [
915           echo "yes"
916           AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
917           has_iconv=true
918           check_iconv=false
919         ],
920         [
921           echo "no"
922           LIBS="$SAVE_LIBS"
923           CFLAGS="$SAVE_CFLAGS"
924           LDFLAGS="$SAVE_LDFLAGS"
925           CPPFLAGS="$SAVE_CPPFLAGS"
926         ])
927      ])
928 fi
929
930 if test x$check_iconv = xtrue; then
931   # search for iconv library..
932   SAVE_LIBS="$LIBS"
933   SAVE_CFLAGS="$CFLAGS"
934   SAVE_LDFLAGS="$LDFLAGS"
935   SAVE_CPPFLAGS="$CPPFLAGS"
936
937   for dir in `echo "/usr/local /usr/pkg /usr/contrib"`; do
938     if test x$has_iconv = xfalse; then
939       AC_MSG_RESULT(searching in $dir...)
940
941       if test -d $dir/include; then
942         CPPFLAGS="$CPPFLAGS -I$dir/include"
943         CFLAGS="$CFLAGS -I$dir/include"
944       fi
945       if test -d $dir/lib; then
946         LDFLAGS="$LDFLAGS -L$dir/lib"
947       fi
948
949       # XXX
950       unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
951
952       AC_CHECK_HEADERS(iconv.h,
953         [
954           LIBS="$LIBS -liconv"
955           AC_MSG_CHECKING(for iconv in -liconv)
956           AC_TRY_LINK(
957             [
958               #include <stdlib.h>
959               #include <iconv.h>
960             ],
961             [
962               iconv_t cd = iconv_open("", "");
963               iconv(cd, NULL, NULL, NULL, NULL);
964               iconv_close(cd);
965             ],
966             [
967               echo "yes"
968               has_iconv=true
969               AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
970             ],
971             [
972               echo "no"
973               has_iconv=false
974
975               LIBS="$SAVE_LIBS"
976               CFLAGS="$SAVE_CFLAGS"
977               LDFLAGS="$SAVE_LDFLAGS"
978               CPPFLAGS="$SAVE_CPPFLAGS"
979             ])
980          ],
981          [
982            CFLAGS="$SAVE_CFLAGS"
983            LDFLAGS="$SAVE_LDFLAGS"
984            CPPFLAGS="$SAVE_CPPFLAGS"
985          ])
986       fi
987     done
988 fi
989
990 if test x$has_iconv = xtrue; then
991   # (1) Some implementations of iconv won't convert from UTF-8 to UTF-8.
992   # (2) In glibc-2.1.2 and earlier there is a bug that messes up ob and
993   #     obl when args 2 and 3 are 0 (fixed in glibc-2.1.3).
994   #
995   AC_CACHE_CHECK([whether this iconv is good enough], ac_iconv_good,
996     AC_TRY_RUN(
997       [
998         #include <iconv.h>
999         int main() {
1000           iconv_t cd;
1001         changequote(, )dnl
1002           char buf[4];
1003         changequote([, ])dnl
1004           char *ob;
1005           size_t obl;
1006           ob = buf, obl = sizeof(buf);
1007           return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1) &&
1008                  (iconv(cd, 0, 0, &ob, &obl) ||
1009                  !(ob == buf && obl == sizeof(buf)) ||
1010                  iconv_close(cd)));
1011         }
1012       ],
1013       [
1014         ac_iconv_good=yes
1015       ],
1016       [
1017         ac_iconv_good=no
1018       ],
1019       [
1020         ac_iconv_good=yes
1021       ])
1022     )
1023
1024   if test x$ac_iconv_good = xno; then
1025     AC_MSG_RESULT(Try using libiconv instead.)
1026   fi
1027 fi
1028
1029
1030 # POSIX threads support
1031 #
1032 has_threads=false
1033 AC_MSG_CHECKING(whether to search for POSIX threads)
1034 AC_ARG_WITH(pthreads,
1035   [[  --with-pthreads[=DIR]   use POSIX threads [search in DIR/include and DIR/lib]]],
1036   [
1037     case "${withval}" in
1038       no)
1039         check_threads=false
1040         ;;
1041       *)
1042         if test -d $withval/include; then
1043           CPPFLAGS="$CPPFLAGS -I$withval/include"
1044           CFLAGS="$CFLAGS -I$withval/include"
1045         fi
1046         if test -d $withval/lib; then
1047           LDFLAGS="$LDFLAGS -L$withval/lib"
1048         fi
1049
1050         check_threads=true
1051         ;;
1052     esac
1053   ])
1054
1055 if test x$check_threads = xtrue; then
1056   SAVE_LIBS="$LIBS"
1057   SAVE_CFLAGS="$CFLAGS"
1058   SAVE_LDFLAGS="$LDFLAGS"
1059   SAVE_CPPFLAGS="$CPPFLAGS"
1060
1061   AC_MSG_RESULT(yes)
1062   AC_CHECK_HEADERS(pthread.h,
1063     [
1064       LIBS="$LIBS -lpthread"
1065       AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
1066         [
1067           # FreeBSD
1068           case "${target}" in
1069             *-*-freebsd*)
1070               LIBS="$SAVE_LIBS -pthread"
1071               AC_CHECK_LIB(c_r, pthread_attr_init, has_threads=true, LIBS="$SAVE_LIBS")
1072               ;;
1073             *)
1074               LIBS="$SAVE_LIBS"
1075               ;;
1076           esac
1077         ])
1078     ],
1079     [
1080       # search for pthread library..
1081       for dir in `echo "/usr/local /usr/pkg /usr/contrib /usr/pkg/pthreads /usr/local/pthreads"`; do
1082         if test x$has_threads = xfalse; then
1083           AC_MSG_RESULT(searching in $dir...)
1084
1085           if test -d $dir/include; then
1086             CPPFLAGS="$CPPFLAGS -I$dir/include"
1087             CFLAGS="$CFLAGS -I$dir/include"
1088           fi
1089           if test -d $dir/lib; then
1090             LDFLAGS="$LDFLAGS -L$dir/lib"
1091           fi
1092
1093           # XXX
1094           unset ac_cv_header__pthread_h_ ac_cv_header_pthread_h || true
1095
1096           AC_CHECK_HEADERS(pthread.h,
1097             [
1098               LIBS="$LIBS -lpthread"
1099               AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
1100                 [
1101                   has_threads=false
1102
1103                   LIBS="$SAVE_LIBS"
1104                   CFLAGS="$SAVE_CFLAGS"
1105                   LDFLAGS="$SAVE_LDFLAGS"
1106                   CPPFLAGS="$SAVE_CPPFLAGS"
1107                 ])
1108             ],
1109             [
1110               CFLAGS="$SAVE_CFLAGS"
1111               LDFLAGS="$SAVE_LDFLAGS"
1112               CPPFLAGS="$SAVE_CPPFLAGS"
1113             ])
1114         fi
1115       done
1116     ])
1117 else
1118   AC_MSG_RESULT(no)
1119   has_threads=false
1120 fi
1121
1122 __SILC_HAVE_PTHREAD=""
1123 AM_CONDITIONAL(SILC_THREADS, test x$has_threads = xtrue)
1124 if test x$has_threads = xtrue; then
1125   CFLAGS="$CFLAGS -D_REENTRANT"
1126
1127   # XXX possibly incomplete
1128   case "${target}" in
1129     *-*-aix*)
1130       CFLAGS="$CFLAGS -D_THREAD_SAFE"
1131       if test x"$GCC" = xyes; then
1132         CFLAGS="$CFLAGS -mthreads"
1133       fi
1134       ;;
1135     *-*-freebsd*)
1136       CFLAGS="$CFLAGS -D_THREAD_SAFE"
1137       ;;
1138     *-*-sysv5uw7*)  # UnixWare 7
1139       if test "$GCC" != "yes"; then
1140         CFLAGS="$CFLAGS -Kthread"
1141       else
1142         CFLAGS="$CFLAGS -pthread"
1143       fi
1144       ;;
1145     *-dg-dgux*)  # DG/UX
1146       CFLAGS="$CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
1147       ;;
1148    esac
1149
1150   AC_CHECK_FUNC(pthread_create)
1151   AC_DEFINE(SILC_HAVE_PTHREAD)
1152   AC_DEFINE(SILC_THREADS)
1153   __SILC_HAVE_PTHREAD="#define __SILC_HAVE_PTHEAD 1"
1154 fi
1155
1156 # Native WIN32 compilation under cygwin
1157 #
1158 AC_MSG_CHECKING(whether to compile native WIN32 code)
1159 AC_ARG_WITH(win32,
1160   [  --with-win32            compile native WIN32 (MinGW) code (-mno-cygwin)],
1161   [
1162     AC_MSG_RESULT(yes)
1163     AC_DEFINE(SILC_WIN32)
1164     win32_support=true
1165     CFLAGS="-mno-cygwin $CFLAGS"
1166     LIBS="$LIBS -lwsock32"
1167   ],
1168   [
1169     AC_MSG_RESULT(no)
1170   ])
1171 AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
1172
1173 # Native EPOC support (disabled by default)
1174 #
1175 AM_CONDITIONAL(SILC_EPOC, test xfalse = xtrue)
1176
1177 # Native BeOS support (disabled by default)
1178 #
1179 AM_CONDITIONAL(SILC_BEOS, test xfalse = xtrue)
1180
1181 # Native OS2 support (disabled by default)
1182 #
1183 AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue)
1184
1185 # --without-irssi
1186 #
1187 without_irssi=false
1188 AC_MSG_CHECKING(whether to compile Irssi SILC Client)
1189 AC_ARG_WITH(irssi,
1190   [  --without-irssi         compile without Irssi SILC Client],
1191   [
1192     AC_MSG_RESULT(no)
1193     without_irssi=true
1194     SILC_DIST_SUBDIRS=`echo $SILC_DIST_SUBDIRS | $sedpath -e 's/irssi//'`
1195   ],
1196   [
1197     AC_MSG_RESULT(yes)
1198   ])
1199
1200 # --without-silcd
1201 #
1202 without_silcd=false
1203 AC_MSG_CHECKING(whether to compile SILC Server)
1204 AC_ARG_WITH(silcd,
1205   [  --without-silcd         compile without SILC Server],
1206   [
1207     AC_MSG_RESULT(no)
1208     without_silcd=true
1209     SILC_DIST_SUBDIRS=`echo $SILC_DIST_SUBDIRS | $sedpath -e 's/silcd//'`
1210   ],
1211   [
1212     AC_MSG_RESULT(yes)
1213   ])
1214
1215 # Irssi perl support
1216 #
1217 AC_ARG_WITH(perl,
1218   [[  --with-perl[=yes|no|module]  Build with Perl support - also specifies
1219                                if it should be built into main silc binary
1220                                (static, default) or as a module]])
1221
1222 libtoolfix=true
1223 AC_MSG_CHECKING(whether to do libtoolfix)
1224 AC_ARG_WITH(libtoolfix,
1225   [  --without-libtoolfix     Do not fix libtool, for package builders],
1226   [
1227     AC_MSG_RESULT(no)
1228     libtoolfix=false
1229   ],
1230   [
1231     AC_MSG_RESULT(yes)
1232   ])
1233
1234 AC_SUBST(ETCDIR)
1235 AC_DEFINE_UNQUOTED(SILC_ETCDIR, "$ETCDIR")
1236
1237
1238
1239 ##
1240 ##  Misc
1241 ##
1242
1243 # Other configure scripts
1244 #
1245 if test x$without_irssi = xfalse; then
1246   if test "x$silc_dist" = "xsilc-client" ||
1247      test "x$silc_dist" = "xsilc-toolkit"; then
1248     AC_CONFIG_SUBDIRS(irssi)
1249   fi
1250 fi
1251
1252 SILC_TOP_SRCDIR=`pwd`
1253 AC_SUBST(SILC_TOP_SRCDIR)
1254 #SILC_INSTALL_PREFIX=$ac_default_prefix
1255 #AC_SUBST(SILC_INSTALL_PREFIX)
1256 AC_SUBST(LIBS)
1257 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
1258 AC_SUBST(INCLUDE_DEFINES_INT)
1259 AC_SUBST(SILC_DIST_SUBDIRS)
1260
1261 #
1262 # Fix the libtool to support run-time configuration.  This allows us
1263 # to in run-time specify when to compile shared/static libraries without
1264 # need to reconfigure the entire libtool.
1265 #
1266 if test x$libtoolfix = xtrue; then
1267   ./libtoolfix $SILC_TOP_SRCDIR/ltmain.sh
1268 fi
1269 AM_CONDITIONAL(SILC_LIBTOOLFIX, test x$libtoolfix = xtrue)
1270
1271 # Included configure scripts
1272 AD_INCLUDE_CONFIGURE
1273
1274 AC_SUBST(__SILC_HAVE_PTHREAD)
1275 AC_SUBST(__SILC_HAVE_SIM)
1276 AC_SUBST(__SILC_HAVE_LIBIDN)
1277 AC_SUBST(__SILC_ENABLE_DEBUG)
1278
1279 #
1280 # Makefile outputs
1281 #
1282 AC_CONFIG_FILES(
1283 Makefile
1284 Makefile.defines
1285 Makefile.defines_int
1286 doc/Makefile
1287 includes/Makefile
1288 lib/Makefile
1289 lib/contrib/Makefile
1290 lib/silccore/Makefile
1291 lib/silccore/tests/Makefile
1292 lib/silccrypt/Makefile
1293 lib/silccrypt/tests/Makefile
1294 lib/silcsim/Makefile
1295 lib/silcske/Makefile
1296 lib/silcutil/Makefile
1297 lib/silcutil/unix/Makefile
1298 lib/silcutil/win32/Makefile
1299 lib/silcutil/beos/Makefile
1300 lib/silcutil/os2/Makefile
1301 lib/silcutil/epoc/Makefile
1302 lib/silcutil/tests/Makefile
1303 lib/silcmath/Makefile
1304 lib/silcsftp/Makefile
1305 lib/silcsftp/tests/Makefile
1306 doc/example_silcd.conf
1307 includes/silcincludes.h
1308 )
1309
1310 if test "x$silc_dist" = "xsilc-client" ||
1311    test "x$silc_dist" = "xsilc-toolkit"; then
1312   AC_CONFIG_FILES(lib/silcclient/Makefile)
1313 fi
1314
1315 if test x$without_irssi = xfalse ; then
1316   if test "x$silc_dist" = "xsilc-client" ||
1317      test "x$silc_dist" = "xsilc-toolkit"; then
1318     AC_CONFIG_FILES(
1319 irssi/Makefile.defines
1320 irssi/Makefile.defines_int
1321 )
1322   fi
1323 fi
1324
1325 if test x$without_silcd = xfalse ; then
1326   if test "x$silc_dist" = "xsilc-server" ||
1327      test "x$silc_dist" = "xsilc-toolkit"; then
1328     AC_CONFIG_FILES(
1329 silcd/Makefile
1330 )
1331   fi
1332 fi
1333
1334 if test "x$silc_dist" = "xsilc-toolkit"; then
1335   AC_CONFIG_FILES(
1336 silc/Makefile
1337 win32/Makefile
1338 win32/libsilc/Makefile
1339 win32/libsilcclient/Makefile
1340 tutorial/Makefile
1341 tutorial/Makefile.defines
1342 tutorial/Makefile.defines_int
1343 )
1344 fi
1345
1346 AC_OUTPUT
1347
1348 s_bindir=`eval echo $bindir`;s_bindir=`eval echo $s_bindir`
1349 s_sbindir=`eval echo $sbindir`;s_sbindir=`eval echo $s_sbindir`
1350 s_mandir=`eval echo $mandir`;s_mandir=`eval echo $s_mandir`
1351 s_includedir=`eval echo $includedir`;s_includedir=`eval echo $s_includedir`
1352
1353 echo ""
1354 echo "SILC Configuration Summary:"
1355 echo "---------------------------"
1356 echo " Target host ...................: $target"
1357 echo " Compiler ......................: $CC"
1358 echo " CFLAGS ........................: $CFLAGS"
1359 echo " CPPFLAGS ......................: $CPPFLAGS"
1360 echo " LDFLAGS .......................: $LDFLAGS"
1361 echo " LIBS ..........................: $LIBS"
1362 echo ""
1363 echo " Installation prefix ...........: $prefix"
1364 echo " bin directory .................: $s_bindir"
1365 echo " sbin directory ................: $s_sbindir"
1366 echo " etc directory .................: $ETCDIR"
1367 echo " man directory .................: $s_mandir"
1368 echo " help directory ................: $HELPDIR"
1369 echo " doc directory .................: $DOCDIR"
1370 echo " logs directory ................: $LOGSDIR"
1371 echo " SIM directory .................: $MODULESDIR"
1372 echo " include directory .............: $s_includedir"
1373 echo ""
1374
1375 if test "x$silc_dist" = "xsilc-client" ||
1376    test "x$silc_dist" = "xsilc-toolkit"; then
1377   irssi="yes"
1378   if test x$without_irssi = xtrue; then
1379     irssi="no"
1380   fi
1381 echo " Compile SILC Client ...........: $irssi"
1382 fi
1383
1384 if test "x$silc_dist" = "xsilc-server" ||
1385    test "x$silc_dist" = "xsilc-toolkit"; then
1386   silcd="yes"
1387   if test x$without_silcd = xtrue; then
1388     silcd="no"
1389   fi
1390 echo " Compile SILC Server ...........: $silcd"
1391 echo " Server configuration file .....: $summary_silcd_configfile"
1392 echo " Server PID file ...............: $PIDFILE"
1393 fi
1394
1395 if test x$sim_support = xfalse; then
1396   sim_support="no"
1397 else
1398   sim_support="yes"
1399 fi
1400 if test x$has_iconv = xfalse; then
1401   iconv_support="no"
1402 else
1403   iconv_support="yes"
1404 fi
1405 if test x$has_libidn = xfalse; then
1406   libidn_support="no"
1407 else
1408   libidn_support="yes"
1409 fi
1410 echo " SIM support ...................: $sim_support"
1411 echo " IPv6 support ..................: $summary_ipv6"
1412 echo " Iconv support .................: $iconv_support"
1413 echo " Idn support ...................: $libidn_support"
1414 if test x$want_asm = xfalse; then
1415   summary_asm="no"
1416 else
1417   summary_asm="yes"
1418 fi
1419 echo " Assembler optimizations .......: $summary_asm"
1420
1421 mp="MPI"
1422 if test x$mp_gmp = xtrue; then
1423   mp="GMP"
1424 fi
1425 echo " Arithmetic library ............: $mp"
1426
1427 threads="no"
1428 if test x$has_threads = xtrue; then
1429   threads="yes"
1430 fi
1431 echo " Multi-threads support .........: $threads"
1432 echo " Debugging enabled .............: $summary_debug"
1433 echo " Stack-trace enabled ...........: $summary_stacktrace"
1434 echo ""
1435 if test "x$silc_dist" = "xsilc-client"; then
1436   echo "Compile the sources with 'make' or 'gmake' command (GNU make is required)."
1437 else
1438   echo "Compile the sources with 'make' or 'gmake' command."
1439 fi