4 # Author: Pekka Riikonen <priikone@silcnet.org>
6 # Copyright (C) 2000 - 2005 Pekka Riikonen
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; version 2 of the License.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
22 AC_CONFIG_HEADERS(silcdefs.h)
29 AC_PATH_PROG(sedpath, sed)
31 #ifdef SILC_DIST_COMPILER
32 # Put here any platform specific stuff
51 __SILC_HAVE_PTHREAD=""
53 __SILC_ENABLE_DEBUG=""
65 # More header checking
67 AC_CHECK_HEADERS(unistd.h string.h getopt.h errno.h fcntl.h assert.h)
68 AC_CHECK_HEADERS(sys/types.h sys/stat.h sys/time.h stddef.h)
69 AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h xti.h netdb.h sys/resource.h)
70 AC_CHECK_HEADERS(pwd.h grp.h termcap.h paths.h)
71 AC_CHECK_HEADERS(ncurses.h signal.h ctype.h utime.h)
72 AC_CHECK_HEADERS(arpa/inet.h sys/mman.h limits.h termios.h locale.h langinfo.h)
82 AC_CHECK_SIZEOF(long long, 0)
83 AC_SUBST(SILC_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long)
84 AC_CHECK_SIZEOF(long, 0)
85 AC_SUBST(SILC_SIZEOF_LONG, $ac_cv_sizeof_long)
86 AC_CHECK_SIZEOF(int, 0)
87 AC_SUBST(SILC_SIZEOF_INT, $ac_cv_sizeof_int)
88 AC_CHECK_SIZEOF(short, 0)
89 AC_SUBST(SILC_SIZEOF_SHORT, $ac_cv_sizeof_short)
90 AC_CHECK_SIZEOF(char, 0)
91 AC_SUBST(SILC_SIZEOF_CHAR, $ac_cv_sizeof_char)
92 AC_CHECK_SIZEOF(void *, 0)
93 AC_SUBST(SILC_SIZEOF_VOID_P, $ac_cv_sizeof_void_p)
95 # Function and library checking
97 AC_CHECK_FUNC(gethostbyname, [],
99 AC_CHECK_LIB(nsl, gethostbyname, LIBS="$LIBS -lnsl")
100 AC_CHECK_FUNC(res_gethostbyname, [],
101 AC_CHECK_LIB(resolv, res_gethostbyname, LIBS="$LIBS -lresolv")
104 AC_CHECK_FUNC(socket, [],
105 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
107 AC_CHECK_FUNCS(gethostname gethostbyaddr getservbyname getservbyport)
108 AC_CHECK_FUNCS(select listen bind shutdown close connect setsockopt)
109 AC_CHECK_FUNCS(time ctime utime gettimeofday getrusage)
110 AC_CHECK_FUNCS(chmod fcntl stat fstat getenv putenv strerror)
111 AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid)
112 AC_CHECK_FUNCS(setgroups initgroups nl_langinfo)
113 AC_CHECK_FUNCS(strchr strstr strcpy strncpy memcpy memset memmove)
116 # SIM support checking
117 # XXX These needs to be changed as more supported platforms appear.
118 # XXX This probably needs to be made platform dependant check.
121 AC_MSG_CHECKING(for SIM support)
123 AC_CHECK_HEADERS(dlfcn.h,
125 AC_CHECK_LIB(dl, dlopen,
127 AC_DEFINE([SILC_SIM], [], [HAVE_SIM])
132 AC_CHECK_LIB(c, dlopen,
134 AC_DEFINE([SILC_SIM], [], [HAVE_SIM])
140 AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue)
141 if test x$sim_support = xtrue; then
142 AC_MSG_RESULT(Enabled SIM support.)
143 __SILC_HAVE_SIM="#define __SILC_HAVE_SIM 1"
145 AC_MSG_RESULT(No SIM support found.)
149 # lib/contrib conditionals
151 AC_CHECK_HEADER(regex.h,
153 AC_DEFINE([HAVE_REGEX], [], [HAVE_REGEX])
157 AM_CONDITIONAL(HAVE_REGEX, test x$have_regex = x1)
159 AC_CHECK_FUNC(getopt_long,
161 AC_DEFINE([HAVE_GETOPT_LONG], [], [HAVE_GETOPT_LONG])
163 ], have_getopt_long=0
165 AM_CONDITIONAL(HAVE_GETOPT_LONG, test x$have_getopt_long = x1)
168 ## Enable/disable checking
173 AC_MSG_CHECKING(whether to enable IPv6 support)
175 [ --enable-ipv6 enable IPv6 support],
177 case "${enableval}" in
182 AC_DEFINE([HAVE_IPV6], [], [HAVE_IPV6])
196 if test x$check_ipv6 = xtrue; then
200 #ifdef HAVE_SYS_TYPES_H
201 #include <sys/types.h>
203 #ifdef HAVE_NETINET_TCP_H
204 #include <netinet/tcp.h>
209 #include <sys/socket.h>
210 #ifdef HAVE_NETINET_IN_H
211 #include <netinet/in.h>
215 struct sockaddr_in6 sin6;
216 int family = AF_INET6;
219 AC_DEFINE([HAVE_IPV6], [], [HAVE_IPV6])
229 AC_MSG_CHECKING(whether to enable debugging)
231 __SILC_ENABLE_DEBUG=""
233 [ --enable-debug enable debugging],
235 case "${enableval}" in
238 AC_DEFINE([SILC_DEBUG], [], [enable-debug])
240 __SILC_ENABLE_DEBUG="#define __SILC_ENABLE_DEBUG 1"
251 # Disable all assembler optimizations
253 AC_MSG_CHECKING(whether to enable assembler optimizations)
256 [ --disable-asm do not use assembler optimizations],
267 ## Compiler and compiler flag checks
270 # Function to check if compiler flag works
271 # Usage: SILC_ADD_CFLAGS(FLAGS, [ACTION-IF-FAILED])
272 AC_DEFUN([SILC_ADD_CFLAGS],
273 [ tmp_CFLAGS="$CFLAGS"
275 AC_MSG_CHECKING(whether $CC accepts $1 flag)
276 AC_TRY_LINK([], [], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
283 # GCC specific options
284 if test "x$summary_debug" = "xyes"; then
285 SILC_ADD_CFLAGS(-g -O)
287 SILC_ADD_CFLAGS(-g -O2)
289 SILC_ADD_CFLAGS(-Wall -finline-functions)
294 SILC_ADD_CFLAGS(-g3 -O2, SILC_ADD_CFLAGS(-g3 -O, SILC_ADD_CFLAGS(-O)))
298 SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
302 # Intel C++ Compiler needs -restrict
303 if test "x$CC" = "xicc"; then
304 SILC_ADD_CFLAGS(-restrict)
309 # Workaround a bug in GCC 2.x which causes memory exhaustion
310 # when compiling sha1 with optimizations on UltraSPARC.
313 if test "$GCC" -a "$host_cpu" = "sparc64"; then
314 AC_MSG_CHECKING(whether to enable GCC 2.x workaround for SHA1)
317 #if defined(__sparc64__) && (__GNUC__ == 2)
331 #endif SILC_DIST_COMPILER
337 # Default installation destination
339 #ifdef SILC_DIST_AUTODIST
340 AC_PREFIX_DEFAULT(/usr/local)
341 #else !SILC_DIST_AUTODIST
342 AC_PREFIX_DEFAULT(/usr/local/silc)
343 #endif SILC_DIST_AUTODIST
344 if test "x$prefix" != xNONE; then
345 silc_prefix="$prefix"
347 silc_prefix="$ac_default_prefix"
350 #ifndef SILC_DIST_AUTODIST
353 if test "x$sysconfdir" != 'x${prefix}/etc'; then
356 ETCDIR="$silc_prefix/etc"
360 [[ --with-etcdir=DIR directory for system files [/etc/silc]]],
371 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
375 DOCDIR="$silc_prefix/doc"
377 [[ --with-docdir=DIR directory for SILC documentation [PREFIX/doc]]],
388 AC_DEFINE_UNQUOTED([SILC_DOCDIR], "$DOCDIR", [SILC_DOCDIR])
389 #endif SILC_DIST_AUTODIST
391 #ifdef SILC_DIST_CLIENT
394 HELPDIR="$silc_prefix/help"
396 [[ --with-helpdir=DIR directory for SILC help files [PREFIX/help]]],
407 AC_DEFINE_UNQUOTED([SILC_HELPDIR], "$HELPDIR", [SILC_HELPDIR])
408 #endif SILC_DIST_CLIENT
411 # SIM modules directory
413 MODULESDIR="$silc_prefix/modules"
415 [[ --with-simdir=DIR directory for SIM modules [PREFIX/modules]]],
421 MODULESDIR="$withval"
426 AC_DEFINE_UNQUOTED([SILC_MODULESDIR], "$MODULESDIR", [SILC_MODULESDIR])
429 #ifdef SILC_DIST_SERVER
432 LOGSDIR="$silc_prefix/logs"
434 [[ --with-logsdir=DIR directory for SILC Server logs [PREFIX/logs]]],
445 AC_DEFINE_UNQUOTED([SILC_LOGSDIR], "$LOGSDIR", [SILC_LOGSDIR])
447 # silcd config file checking
449 summary_silcd_configfile="/etc/silc/silcd.conf"
450 AC_ARG_WITH(silcd-config-file,
451 [[ --with-silcd-config-file=FILE use FILE as default configuration file
452 for SILC Server [/etc/silc/silcd.conf]]],
453 AC_DEFINE_UNQUOTED([SILC_SERVER_CONFIG_FILE], "$withval", [SILC_SERVER_CONFIG_FILE])
454 summary_silcd_configfile="$withval"
457 # silcd pid file checking
459 if test "x$localstatedir" != 'x${prefix}/var'; then
460 PIDFILE="$localstatedir/silcd.pid"
462 PIDFILE="$silc_prefix/var/silcd.pid"
465 AC_ARG_WITH(silcd-pid-file,
466 [[ --with-silcd-pid-file=FILE use FILE as default pid file for SILC
467 Server [/var/run/silcd.pid]]],
478 #endif SILC_DIST_SERVER
480 #ifdef SILC_DIST_COMPILER
482 ## With/without checkings
486 # SILC library checking
489 #ifndef SILC_DIST_TOOLKIT
491 AC_ARG_WITH(silc-includes,
492 [ --with-silc-includes=DIR SILC Toolkit includes [search in DIR]],
493 [ac_silc_includes="$withval"], [ac_silc_includes="no"])
494 AC_ARG_WITH(silc-libs,
495 [ --with-silc-libs=DIR SILC Toolkit libraries [search in DIR]],
496 [ac_silc_libs="$withval"], [ac_silc_libs="no"])
499 # XXX missing checking the __SILC_WITH_XXX defines from the provided libs
500 # in order to determine correct libs to link.
503 # XXX missing pkg-config check.
505 if test "$ac_silc_includes" != "no"; then
507 SILC_LIB_INCLUDES="-I$ac_silc_includes"
509 if test "$ac_silc_libs" != "no"; then
511 LIBS="$LIBS -L$ac_silc_libs"
514 #endif SILC_DIST_TOOLKIT
517 # SOCKS4 support checking
520 SAVE_CFLAGS="$CFLAGS"
521 SAVE_LDFLAGS="$LDFLAGS"
522 AC_MSG_CHECKING(whether to support SOCKS4)
524 [[ --with-socks4[=DIR] with SOCKS4 support [search in DIR/lib and DIR/include]]],
534 if test -d "$withval/include"; then
535 CFLAGS="$CFLAGS -I$withval/include"
537 if test -d "$withval/lib"; then
538 LDFLAGS="$LDFLAGS -L$withval/lib"
550 AC_MSG_ERROR(Could not find SOCKS4 library.)
552 CFLAGS="$SAVE_CFLAGS"
553 LDFLAGS="$SAVE_LDFLAGS"
559 # SOCKS5 support checking
562 SAVE_CFLAGS="$CFLAGS"
563 SAVE_LDFLAGS="$LDFLAGS"
564 AC_MSG_CHECKING(whether to support SOCKS5)
566 [[ --with-socks5[=DIR] with SOCKS5 support [search in DIR/lib and DIR/include]]],
576 if test -d "$withval/include"; then
577 CFLAGS="$CFLAGS -I$withval/include"
579 if test -d "$withval/lib"; then
580 LDFLAGS="$LDFLAGS -L$withval/lib"
583 LIBS="-lsocks5 $LIBS"
592 AC_MSG_ERROR(Could not find SOCKS5 library.)
594 CFLAGS="$SAVE_CFLAGS"
595 LDFLAGS="$SAVE_LDFLAGS"
601 if test "x$socks" = "x4"; then
602 AC_DEFINE([SOCKS], [], [Socks])
603 CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
606 if test "x$socks" = "x5"; then
607 AC_DEFINE([SOCKS], [], [Socks])
608 AC_DEFINE([SOCKS5], [], [Socks5])
609 AC_DEFINE([Rconnect], [SOCKSconnect], [Socks])
610 AC_DEFINE([Rgetsockname], [SOCKSgetsockname], [Socks])
611 AC_DEFINE([Rgetpeername], [SOCKSgetpeername], [Socks])
612 AC_DEFINE([Rbind], [SOCKSbind], [Socks])
613 AC_DEFINE([Raccept], [SOCKSaccept], [Socks])
614 AC_DEFINE([Rlisten], [SOCKSlisten], [Socks])
615 AC_DEFINE([Rselect], [SOCKSselect], [Socks])
616 AC_DEFINE([Rrecvfrom], [SOCKSrecvfrom], [Socks])
617 AC_DEFINE([Rsendto], [SOCKSsendto], [Socks])
618 AC_DEFINE([Rrecv], [SOCKSrecv], [Socks])
619 AC_DEFINE([Rsend], [SOCKSsend], [Socks])
620 AC_DEFINE([Rread], [SOCKSread], [Socks])
621 AC_DEFINE([Rwrite], [SOCKSwrite], [Socks])
622 AC_DEFINE([Rrresvport], [SOCKSrresvport], [Socks])
623 AC_DEFINE([Rshutdown], [SOCKSshutdown], [Socks])
624 AC_DEFINE([Rlisten], [SOCKSlisten], [Socks])
625 AC_DEFINE([Rclose], [SOCKSclose], [Socks])
626 AC_DEFINE([Rdup], [SOCKSdup], [Socks])
627 AC_DEFINE([Rdup2], [SOCKSdup2], [Socks])
628 AC_DEFINE([Rfclose], [SOCKSfclose], [Socks])
629 AC_DEFINE([Rgethostbyname], [SOCKSgethostbyname], [Socks])
632 #ifdef SILC_DIST_MATH
633 # MP library checking. First check whether user wants to use GMP and use
634 # it if found. If not or not defined then compile the MPI library in the
639 SAVE_CFLAGS="$CFLAGS"
640 SAVE_LDFLAGS="$LDFLAGS"
641 AC_MSG_CHECKING(whether to search for GMP)
643 [[ --with-gmp[=DIR] use GMP instead of MPI [search in DIR/lib and DIR/include]]],
652 if test -d "$withval/include"; then
653 CFLAGS="$CFLAGS -I$withval/include"
655 if test -d "$withval/lib"; then
656 LDFLAGS="$LDFLAGS -L$withval/lib"
663 AC_CHECK_LIB(gmp, __gmpz_init,
666 AC_DEFINE([SILC_MP_GMP], [], [GMP])
667 AC_MSG_RESULT(Using GMP as a MP library.)
671 CFLAGS="$SAVE_CFLAGS"
672 LDFLAGS="$SAVE_LDFLAGS"
678 AM_CONDITIONAL(SILC_MP_GMP, test x$mp_gmp = xtrue)
679 AM_CONDITIONAL(SILC_MP_NSS_MPI, test x$mp_gmp = xfalse)
680 if test x$mp_gmp = xfalse; then
681 AC_DEFINE([SILC_MP_NSS_MPI], [], [MPI])
682 AC_MSG_RESULT(Using NSS MPI as a MP library.)
684 #endif SILC_DIST_MATH
691 SAVE_CFLAGS="$CFLAGS"
692 SAVE_LDFLAGS="$LDFLAGS"
693 SAVE_CPPFLAGS="$CPPFLAGS"
694 AC_MSG_CHECKING(whether to implicit search for libiconv)
696 [[ --with-iconv[=DIR] use libiconv [search in DIR/include and DIR/lib]]],
701 AC_CHECK_HEADERS(iconv.h,
703 AC_CHECK_FUNC(iconv, has_iconv=true)
709 if test -d $withval/include; then
710 CPPFLAGS="$CPPFLAGS -I$withval/include"
711 CFLAGS="$CFLAGS -I$withval/include"
713 if test -d $withval/lib; then
714 LDFLAGS="$LDFLAGS -L$withval/lib"
721 AC_CHECK_HEADERS(iconv.h,
723 AC_CHECK_FUNCS(iconv,
731 if test x$check_iconv = xtrue; then
732 AC_MSG_RESULT(Searching for iconv...)
735 unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
737 AC_CHECK_HEADERS(iconv.h,
740 AC_MSG_CHECKING(for iconv in -liconv)
747 iconv_t cd = iconv_open("", "");
748 iconv(cd, NULL, NULL, NULL, NULL);
753 AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
760 CFLAGS="$SAVE_CFLAGS"
761 LDFLAGS="$SAVE_LDFLAGS"
762 CPPFLAGS="$SAVE_CPPFLAGS"
767 if test x$check_iconv = xtrue; then
768 # search for iconv library..
770 SAVE_CFLAGS="$CFLAGS"
771 SAVE_LDFLAGS="$LDFLAGS"
772 SAVE_CPPFLAGS="$CPPFLAGS"
774 for dir in `echo "/usr/local /usr/pkg /usr/contrib"`; do
775 if test x$has_iconv = xfalse; then
776 AC_MSG_RESULT(searching in $dir...)
778 if test -d $dir/include; then
779 CPPFLAGS="$CPPFLAGS -I$dir/include"
780 CFLAGS="$CFLAGS -I$dir/include"
782 if test -d $dir/lib; then
783 LDFLAGS="$LDFLAGS -L$dir/lib"
787 unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
789 AC_CHECK_HEADERS(iconv.h,
792 AC_MSG_CHECKING(for iconv in -liconv)
799 iconv_t cd = iconv_open("", "");
800 iconv(cd, NULL, NULL, NULL, NULL);
806 AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
813 CFLAGS="$SAVE_CFLAGS"
814 LDFLAGS="$SAVE_LDFLAGS"
815 CPPFLAGS="$SAVE_CPPFLAGS"
819 CFLAGS="$SAVE_CFLAGS"
820 LDFLAGS="$SAVE_LDFLAGS"
821 CPPFLAGS="$SAVE_CPPFLAGS"
827 if test x$has_iconv = xtrue; then
828 # (1) Some implementations of iconv won't convert from UTF-8 to UTF-8.
829 # (2) In glibc-2.1.2 and earlier there is a bug that messes up ob and
830 # obl when args 2 and 3 are 0 (fixed in glibc-2.1.3).
832 AC_CACHE_CHECK([whether this iconv is good enough], ac_iconv_good,
843 ob = buf, obl = sizeof(buf);
844 return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1) &&
845 (iconv(cd, 0, 0, &ob, &obl) ||
846 !(ob == buf && obl == sizeof(buf)) ||
861 if test x$ac_iconv_good = xno; then
862 AC_MSG_RESULT(Try using libiconv instead.)
866 # POSIX threads support
869 AC_MSG_CHECKING(whether to search for POSIX threads)
870 AC_ARG_WITH(pthreads,
871 [[ --with-pthreads[=DIR] use POSIX threads [search in DIR/include and DIR/lib]]],
878 if test -d $withval/include; then
879 CPPFLAGS="$CPPFLAGS -I$withval/include"
880 CFLAGS="$CFLAGS -I$withval/include"
882 if test -d $withval/lib; then
883 LDFLAGS="$LDFLAGS -L$withval/lib"
891 if test x$check_threads = xtrue; then
893 SAVE_CFLAGS="$CFLAGS"
894 SAVE_LDFLAGS="$LDFLAGS"
895 SAVE_CPPFLAGS="$CPPFLAGS"
898 AC_CHECK_HEADERS(pthread.h,
900 LIBS="$LIBS -lpthread"
901 AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
906 LIBS="$SAVE_LIBS -pthread"
907 AC_CHECK_LIB(c_r, pthread_attr_init, has_threads=true, LIBS="$SAVE_LIBS")
916 # search for pthread library..
917 for dir in `echo "/usr/local /usr/pkg /usr/contrib /usr/pkg/pthreads /usr/local/pthreads"`; do
918 if test x$has_threads = xfalse; then
919 AC_MSG_RESULT(searching in $dir...)
921 if test -d $dir/include; then
922 CPPFLAGS="$CPPFLAGS -I$dir/include"
923 CFLAGS="$CFLAGS -I$dir/include"
925 if test -d $dir/lib; then
926 LDFLAGS="$LDFLAGS -L$dir/lib"
930 unset ac_cv_header__pthread_h_ ac_cv_header_pthread_h || true
932 AC_CHECK_HEADERS(pthread.h,
934 LIBS="$LIBS -lpthread"
935 AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
940 CFLAGS="$SAVE_CFLAGS"
941 LDFLAGS="$SAVE_LDFLAGS"
942 CPPFLAGS="$SAVE_CPPFLAGS"
946 CFLAGS="$SAVE_CFLAGS"
947 LDFLAGS="$SAVE_LDFLAGS"
948 CPPFLAGS="$SAVE_CPPFLAGS"
958 __SILC_HAVE_PTHREAD=""
959 AM_CONDITIONAL(SILC_THREADS, test x$has_threads = xtrue)
960 if test x$has_threads = xtrue; then
961 CFLAGS="$CFLAGS -D_REENTRANT"
963 # XXX possibly incomplete
966 CFLAGS="$CFLAGS -D_THREAD_SAFE"
967 if test x"$GCC" = xyes; then
968 CFLAGS="$CFLAGS -mthreads"
972 CFLAGS="$CFLAGS -D_THREAD_SAFE"
974 *-*-sysv5uw7*) # UnixWare 7
975 if test "$GCC" != "yes"; then
976 CFLAGS="$CFLAGS -Kthread"
978 CFLAGS="$CFLAGS -pthread"
982 CFLAGS="$CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
986 AC_CHECK_FUNC(pthread_create)
987 AC_DEFINE([SILC_HAVE_PTHREAD], [], [HAVE_PTHREAD])
988 AC_DEFINE([SILC_THREADS], [], [HAVE_THREAD])
989 __SILC_HAVE_PTHREAD="#define __SILC_HAVE_PTHREAD 1"
992 # Native WIN32 compilation under cygwin
994 AC_MSG_CHECKING(whether to compile native WIN32 code)
996 [ --with-win32 compile native WIN32 (MinGW) code (-mno-cygwin)],
999 AC_DEFINE([SILC_WIN32], [], [SILC_WIN32])
1001 CFLAGS="-mno-cygwin $CFLAGS"
1002 LIBS="$LIBS -lwsock32"
1007 AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
1009 # Native EPOC support (disabled by default)
1011 AM_CONDITIONAL(SILC_EPOC, test xfalse = xtrue)
1013 # Native BeOS support (disabled by default)
1015 AM_CONDITIONAL(SILC_BEOS, test xfalse = xtrue)
1017 # Native OS2 support (disabled by default)
1019 AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue)
1021 #ifdef SILC_DIST_TOOLKIT
1026 AC_MSG_CHECKING(whether to compile Irssi SILC Client)
1028 [ --without-irssi compile without Irssi SILC Client],
1040 AC_MSG_CHECKING(whether to compile SILC Server)
1042 [ --without-silcd compile without SILC Server],
1051 #endif SILC_DIST_TOOLKIT
1053 #ifdef SILC_DIST_CLIENT
1054 # Irssi perl support
1057 [[ --with-perl[=yes|no|module] Build with Perl support - also specifies
1058 if it should be built into main silc binary
1059 (static, default) or as a module]])
1060 #endif SILC_DIST_CLIENT
1063 AC_MSG_CHECKING(whether to do libtoolfix)
1064 AC_ARG_WITH(libtoolfix,
1065 [ --without-libtoolfix Do not fix libtool, for package builders],
1075 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
1077 #endif SILC_DIST_COMPILER
1083 # Other configure scripts
1086 #ifdef SILC_DIST_TOOLKIT
1087 if test x$without_irssi = xfalse; then
1088 #endif SILC_DIST_TOOLKIT
1089 #ifdef SILC_DIST_CLIENT
1090 AC_CONFIG_SUBDIRS(irssi)
1092 #endif SILC_DIST_CLIENT
1093 #ifdef SILC_DIST_TOOLKIT
1095 #endif SILC_DIST_TOOLKIT
1097 SILC_TOP_SRCDIR=`pwd`
1099 # Included configure scripts
1100 AD_INCLUDE_CONFIGURE
1102 #ifdef SILC_DIST_COMPILER
1106 AC_SUBST(SILC_TOP_SRCDIR)
1108 AC_SUBST(SILC_LIB_INCLUDES)
1109 AC_SUBST(__SILC_HAVE_PTHREAD)
1110 AC_SUBST(__SILC_HAVE_SIM)
1111 AC_SUBST(__SILC_ENABLE_DEBUG)
1114 # Fix the libtool to support run-time configuration. This allows us
1115 # to in run-time specify when to compile shared/static libraries without
1116 # need to reconfigure the entire libtool.
1118 if test x$libtoolfix = xtrue; then
1119 ./libtoolfix $SILC_TOP_SRCDIR/ltmain.sh
1121 AM_CONDITIONAL(SILC_LIBTOOLFIX, test x$libtoolfix = xtrue)
1123 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
1124 AC_SUBST(INCLUDE_DEFINES_INT)
1126 #endif SILC_DIST_COMPILER
1133 #ifdef SILC_DIST_DOC
1135 #endif SILC_DIST_DOC
1136 #ifdef SILC_DIST_COMPILER
1138 Makefile.defines_int
1140 includes/silcversion.h
1141 includes/silcincludes.h
1142 #endif SILC_DIST_COMPILER
1143 #ifdef SILC_DIST_APPS
1145 #endif SILC_DIST_APPS
1148 #ifdef SILC_DIST_TOOLKIT
1149 if test x$without_irssi = xfalse ; then
1150 #endif SILC_DIST_TOOLKIT
1151 #ifdef SILC_DIST_CLIENT
1153 irssi/Makefile.defines
1154 irssi/Makefile.defines_int
1156 #endif SILC_DIST_CLIENT
1157 #ifdef SILC_DIST_TOOLKIT
1159 #endif SILC_DIST_TOOLKIT
1161 #ifdef SILC_DIST_TOOLKIT
1162 if test x$without_silcd = xfalse ; then
1163 #endif SILC_DIST_TOOLKIT
1164 #ifdef SILC_DIST_SERVER
1167 doc/example_silcd.conf
1169 #endif SILC_DIST_SERVER
1170 #ifdef SILC_DIST_TOOLKIT
1172 #endif SILC_DIST_TOOLKIT
1174 #ifdef SILC_DIST_TOOLKIT
1178 win32/libsilc/Makefile
1179 win32/libsilcclient/Makefile
1181 tutorial/Makefile.defines
1182 tutorial/Makefile.defines_int
1184 #endif SILC_DIST_TOOLKIT
1188 #ifdef SILC_DIST_COMPILER
1189 s_bindir=`eval echo $bindir`;s_bindir=`eval echo $s_bindir`
1190 s_sbindir=`eval echo $sbindir`;s_sbindir=`eval echo $s_sbindir`
1191 s_mandir=`eval echo $mandir`;s_mandir=`eval echo $s_mandir`
1192 s_includedir=`eval echo $includedir`;s_includedir=`eval echo $s_includedir`
1195 echo "$PACKAGE Configuration Summary:"
1196 echo "---------------------------"
1197 echo " Target host ...................: $target"
1198 echo " Compiler ......................: $CC"
1199 echo " CFLAGS ........................: $CFLAGS"
1200 echo " CPPFLAGS ......................: $CPPFLAGS"
1201 echo " LDFLAGS .......................: $LDFLAGS"
1202 echo " LIBS ..........................: $LIBS"
1204 echo " Installation prefix ...........: $prefix"
1205 echo " bin directory .................: $s_bindir"
1206 echo " sbin directory ................: $s_sbindir"
1207 echo " etc directory .................: $ETCDIR"
1208 echo " man directory .................: $s_mandir"
1209 echo " doc directory .................: $DOCDIR"
1210 #ifdef SILC_DIST_CLIENT
1211 echo " help directory ................: $HELPDIR"
1212 #endif SILC_DIST_CLIENT
1213 #ifdef SILC_DIST_SERVER
1214 echo " logs directory ................: $LOGSDIR"
1215 #endif SILC_DIST_SERVER
1216 #ifdef SILC_DIST_SIM
1217 echo " SIM directory .................: $MODULESDIR"
1218 #endif SILC_DIST_SIM
1219 #ifdef SILC_DIST_INCLUDES
1220 echo " include directory .............: $s_includedir"
1221 #endif SILC_DIST_INCLUDES
1224 #ifdef SILC_DIST_SERVER
1226 #endif SILC_DIST_SERVER
1228 #ifdef SILC_DIST_TOOLKIT
1229 if test x$without_irssi = xtrue; then
1232 if test x$without_silcd = xtrue; then
1235 #endif SILC_DIST_TOOLKIT
1237 #ifdef SILC_DIST_CLIENT
1238 echo " Compile SILC Client ...........: $irssi"
1239 #endif SILC_DIST_CLIENT
1241 #ifdef SILC_DIST_SERVER
1242 echo " Compile SILC Server ...........: $silcd"
1243 echo " Server configuration file .....: $summary_silcd_configfile"
1244 echo " Server PID file ...............: $PIDFILE"
1245 #endif SILC_DIST_SERVER
1247 #ifdef SILC_DIST_SIM
1248 if test x$sim_support = xfalse; then
1253 echo " SIM support ...................: $sim_support"
1254 #endif SILC_DIST_SIM
1256 echo " IPv6 support ..................: $summary_ipv6"
1258 if test x$has_iconv = xfalse; then
1263 echo " Iconv support .................: $iconv_support"
1265 if test x$want_asm = xfalse; then
1270 echo " Assembler optimizations .......: $summary_asm"
1272 #ifdef SILC_DIST_MATH
1274 if test x$mp_gmp = xtrue; then
1277 echo " Arithmetic library ............: $mp"
1278 #endif SILC_DIST_MATH
1281 if test x$has_threads = xtrue; then
1284 echo " Multi-threads support .........: $threads"
1285 echo " Debugging enabled .............: $summary_debug"
1287 echo "Compile the sources with 'make' or 'gmake' command."
1288 #endif SILC_DIST_COMPILER