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