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.
20 # Put here any platform specific stuff
37 AC_CONFIG_HEADERS(includes/silcdefs.h)
47 __SILC_HAVE_PTHREAD=""
49 __SILC_ENABLE_DEBUG=""
59 AC_PATH_PROG(sedpath, sed)
67 # More header checking
69 AC_CHECK_HEADERS(unistd.h string.h getopt.h errno.h fcntl.h assert.h)
70 AC_CHECK_HEADERS(sys/types.h sys/stat.h sys/time.h stddef.h)
71 AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h xti.h netdb.h sys/resource.h)
72 AC_CHECK_HEADERS(pwd.h grp.h termcap.h paths.h)
73 AC_CHECK_HEADERS(ncurses.h signal.h ctype.h utime.h)
74 AC_CHECK_HEADERS(arpa/inet.h sys/mman.h limits.h termios.h locale.h langinfo.h)
84 AC_CHECK_SIZEOF(long long, 0)
85 AC_SUBST(SILC_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long)
86 AC_CHECK_SIZEOF(long, 0)
87 AC_SUBST(SILC_SIZEOF_LONG, $ac_cv_sizeof_long)
88 AC_CHECK_SIZEOF(int, 0)
89 AC_SUBST(SILC_SIZEOF_INT, $ac_cv_sizeof_int)
90 AC_CHECK_SIZEOF(short, 0)
91 AC_SUBST(SILC_SIZEOF_SHORT, $ac_cv_sizeof_short)
92 AC_CHECK_SIZEOF(char, 0)
93 AC_SUBST(SILC_SIZEOF_CHAR, $ac_cv_sizeof_char)
94 AC_CHECK_SIZEOF(void *, 0)
95 AC_SUBST(SILC_SIZEOF_VOID_P, $ac_cv_sizeof_void_p)
97 # Function and library checking
99 AC_CHECK_FUNC(gethostbyname, [],
101 AC_CHECK_LIB(nsl, gethostbyname, LIBS="$LIBS -lnsl")
102 AC_CHECK_FUNC(res_gethostbyname, [],
103 AC_CHECK_LIB(resolv, res_gethostbyname, LIBS="$LIBS -lresolv")
106 AC_CHECK_FUNC(socket, [],
107 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
109 AC_CHECK_FUNCS(gethostname gethostbyaddr getservbyname getservbyport)
110 AC_CHECK_FUNCS(select listen bind shutdown close connect setsockopt)
111 AC_CHECK_FUNCS(time ctime utime gettimeofday getrusage)
112 AC_CHECK_FUNCS(chmod fcntl stat fstat getenv putenv strerror)
113 AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid)
114 AC_CHECK_FUNCS(setgroups initgroups nl_langinfo)
115 AC_CHECK_FUNCS(strchr strstr strcpy strncpy memcpy memset memmove)
117 # SIM support checking
118 # XXX These needs to be changed as more supported platforms appear.
119 # XXX This probably needs to be made platform dependant check.
122 AC_MSG_CHECKING(for SIM support)
124 AC_CHECK_HEADERS(dlfcn.h,
126 AC_CHECK_LIB(dl, dlopen,
128 AC_DEFINE([SILC_SIM], [], [HAVE_SIM])
133 AC_CHECK_LIB(c, dlopen,
135 AC_DEFINE([SILC_SIM], [], [HAVE_SIM])
141 AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue)
142 if test x$sim_support = xtrue; then
143 AC_MSG_RESULT(Enabled SIM support.)
144 __SILC_HAVE_SIM="#define __SILC_HAVE_SIM 1"
146 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],
268 ## Compiler and compiler flag checks
271 # Function to check if compiler flag works
272 # Usage: SILC_ADD_CFLAGS(FLAGS, [ACTION-IF-FAILED])
273 AC_DEFUN([SILC_ADD_CFLAGS],
274 [ tmp_CFLAGS="$CFLAGS"
276 AC_MSG_CHECKING(whether $CC accepts $1 flag)
277 AC_TRY_LINK([], [], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
284 # GCC specific options
285 if test "x$summary_debug" = "xyes"; then
286 SILC_ADD_CFLAGS(-g -O)
288 SILC_ADD_CFLAGS(-g -O2)
290 SILC_ADD_CFLAGS(-Wall -finline-functions)
295 SILC_ADD_CFLAGS(-g3 -O2, SILC_ADD_CFLAGS(-g3 -O, SILC_ADD_CFLAGS(-O)))
299 SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
303 # Intel C++ Compiler needs -restrict
304 if test "x$CC" = "xicc"; then
305 SILC_ADD_CFLAGS(-restrict)
310 # Workaround a bug in GCC 2.x which causes memory exhaustion
311 # when compiling sha1 with optimizations on UltraSPARC.
314 if test "$GCC" -a "$host_cpu" = "sparc64"; then
315 AC_MSG_CHECKING(whether to enable GCC 2.x workaround for SHA1)
318 #if defined(__sparc64__) && (__GNUC__ == 2)
337 # Default installation destination
339 AC_PREFIX_DEFAULT(/usr/local/silc)
340 if test "x$prefix" != xNONE; then
341 silc_prefix="$prefix"
343 silc_prefix="$ac_default_prefix"
348 if test "x$sysconfdir" != 'x${prefix}/etc'; then
351 ETCDIR="$silc_prefix/etc"
355 [[ --with-etcdir=DIR directory for system files [/etc/silc]]],
366 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
370 HELPDIR="$silc_prefix/help"
372 [[ --with-helpdir=DIR directory for SILC help files [PREFIX/help]]],
383 AC_DEFINE_UNQUOTED([SILC_HELPDIR], "$HELPDIR", [SILC_HELPDIR])
387 DOCDIR="$silc_prefix/doc"
389 [[ --with-docdir=DIR directory for SILC documentation [PREFIX/doc]]],
400 AC_DEFINE_UNQUOTED([SILC_DOCDIR], "$DOCDIR", [SILC_DOCDIR])
402 # SIM modules directory
404 MODULESDIR="$silc_prefix/modules"
406 [[ --with-simdir=DIR directory for SIM modules [PREFIX/modules]]],
412 MODULESDIR="$withval"
417 AC_DEFINE_UNQUOTED([SILC_MODULESDIR], "$MODULESDIR", [SILC_MODULESDIR])
419 #ifdef SILC_DIST_SERVER
423 LOGSDIR="$silc_prefix/logs"
425 [[ --with-logsdir=DIR directory for SILC Server logs [PREFIX/logs]]],
436 AC_DEFINE_UNQUOTED([SILC_LOGSDIR], "$LOGSDIR", [SILC_LOGSDIR])
438 # silcd config file checking
440 summary_silcd_configfile="/etc/silc/silcd.conf"
441 AC_ARG_WITH(silcd-config-file,
442 [[ --with-silcd-config-file=FILE use FILE as default configuration file
443 for SILC Server [/etc/silc/silcd.conf]]],
444 AC_DEFINE_UNQUOTED([SILC_SERVER_CONFIG_FILE], "$withval", [SILC_SERVER_CONFIG_FILE])
445 summary_silcd_configfile="$withval"
448 # silcd pid file checking
450 if test "x$localstatedir" != 'x${prefix}/var'; then
451 PIDFILE="$localstatedir/silcd.pid"
453 PIDFILE="$silc_prefix/var/silcd.pid"
456 AC_ARG_WITH(silcd-pid-file,
457 [[ --with-silcd-pid-file=FILE use FILE as default pid file for SILC
458 Server [/var/run/silcd.pid]]],
469 #endif SILC_DIST_SERVER
472 ## With/without checkings
476 # SILC library checking
479 #ifndef SILC_DIST_TOOLKIT
481 AC_ARG_WITH(silc-includes,
482 [ --with-silc-includes=DIR SILC Toolkit includes [search in DIR]],
483 [ac_silc_includes="$withval"], [ac_silc_includes="no"])
484 AC_ARG_WITH(silc-libs,
485 [ --with-silc-libs=DIR SILC Toolkit libraries [search in DIR]],
486 [ac_silc_libs="$withval"], [ac_silc_libs="no"])
489 # XXX missing checking the __SILC_WITH_XXX defines from the provided libs
490 # in order to determine correct libs to link.
493 # XXX missing pkg-config check.
495 if test "$ac_silc_includes" != "no"; then
497 SILC_LIB_INCLUDES="-I$ac_silc_includes"
499 if test "$ac_silc_libs" != "no"; then
501 LIBS="$LIBS -L$ac_silc_libs"
504 #endif SILC_DIST_TOOLKIT
507 # SOCKS4 support checking
510 SAVE_CFLAGS="$CFLAGS"
511 SAVE_LDFLAGS="$LDFLAGS"
512 AC_MSG_CHECKING(whether to support SOCKS4)
514 [[ --with-socks4[=DIR] with SOCKS4 support [search in DIR/lib and DIR/include]]],
524 if test -d "$withval/include"; then
525 CFLAGS="$CFLAGS -I$withval/include"
527 if test -d "$withval/lib"; then
528 LDFLAGS="$LDFLAGS -L$withval/lib"
540 AC_MSG_ERROR(Could not find SOCKS4 library.)
542 CFLAGS="$SAVE_CFLAGS"
543 LDFLAGS="$SAVE_LDFLAGS"
549 # SOCKS5 support checking
552 SAVE_CFLAGS="$CFLAGS"
553 SAVE_LDFLAGS="$LDFLAGS"
554 AC_MSG_CHECKING(whether to support SOCKS5)
556 [[ --with-socks5[=DIR] with SOCKS5 support [search in DIR/lib and DIR/include]]],
566 if test -d "$withval/include"; then
567 CFLAGS="$CFLAGS -I$withval/include"
569 if test -d "$withval/lib"; then
570 LDFLAGS="$LDFLAGS -L$withval/lib"
573 LIBS="-lsocks5 $LIBS"
582 AC_MSG_ERROR(Could not find SOCKS5 library.)
584 CFLAGS="$SAVE_CFLAGS"
585 LDFLAGS="$SAVE_LDFLAGS"
591 if test "x$socks" = "x4"; then
592 AC_DEFINE([SOCKS], [], [Socks])
593 CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
596 if test "x$socks" = "x5"; then
597 AC_DEFINE([SOCKS], [], [Socks])
598 AC_DEFINE([SOCKS5], [], [Socks5])
599 AC_DEFINE([Rconnect], [SOCKSconnect], [Socks])
600 AC_DEFINE([Rgetsockname], [SOCKSgetsockname], [Socks])
601 AC_DEFINE([Rgetpeername], [SOCKSgetpeername], [Socks])
602 AC_DEFINE([Rbind], [SOCKSbind], [Socks])
603 AC_DEFINE([Raccept], [SOCKSaccept], [Socks])
604 AC_DEFINE([Rlisten], [SOCKSlisten], [Socks])
605 AC_DEFINE([Rselect], [SOCKSselect], [Socks])
606 AC_DEFINE([Rrecvfrom], [SOCKSrecvfrom], [Socks])
607 AC_DEFINE([Rsendto], [SOCKSsendto], [Socks])
608 AC_DEFINE([Rrecv], [SOCKSrecv], [Socks])
609 AC_DEFINE([Rsend], [SOCKSsend], [Socks])
610 AC_DEFINE([Rread], [SOCKSread], [Socks])
611 AC_DEFINE([Rwrite], [SOCKSwrite], [Socks])
612 AC_DEFINE([Rrresvport], [SOCKSrresvport], [Socks])
613 AC_DEFINE([Rshutdown], [SOCKSshutdown], [Socks])
614 AC_DEFINE([Rlisten], [SOCKSlisten], [Socks])
615 AC_DEFINE([Rclose], [SOCKSclose], [Socks])
616 AC_DEFINE([Rdup], [SOCKSdup], [Socks])
617 AC_DEFINE([Rdup2], [SOCKSdup2], [Socks])
618 AC_DEFINE([Rfclose], [SOCKSfclose], [Socks])
619 AC_DEFINE([Rgethostbyname], [SOCKSgethostbyname], [Socks])
622 # MP library checking. First check whether user wants to use GMP and use
623 # it if found. If not or not defined then compile the MPI library in the
628 SAVE_CFLAGS="$CFLAGS"
629 SAVE_LDFLAGS="$LDFLAGS"
630 AC_MSG_CHECKING(whether to search for GMP)
632 [[ --with-gmp[=DIR] use GMP instead of MPI [search in DIR/lib and DIR/include]]],
641 if test -d "$withval/include"; then
642 CFLAGS="$CFLAGS -I$withval/include"
644 if test -d "$withval/lib"; then
645 LDFLAGS="$LDFLAGS -L$withval/lib"
652 AC_CHECK_LIB(gmp, __gmpz_init,
655 AC_DEFINE([SILC_MP_GMP], [], [GMP])
656 AC_MSG_RESULT(Using GMP as a MP library.)
660 CFLAGS="$SAVE_CFLAGS"
661 LDFLAGS="$SAVE_LDFLAGS"
667 AM_CONDITIONAL(SILC_MP_GMP, test x$mp_gmp = xtrue)
668 AM_CONDITIONAL(SILC_MP_NSS_MPI, test x$mp_gmp = xfalse)
669 if test x$mp_gmp = xfalse; then
670 AC_DEFINE([SILC_MP_NSS_MPI], [], [MPI])
671 AC_MSG_RESULT(Using NSS MPI as a MP library.)
680 SAVE_CFLAGS="$CFLAGS"
681 SAVE_LDFLAGS="$LDFLAGS"
682 SAVE_CPPFLAGS="$CPPFLAGS"
683 AC_MSG_CHECKING(whether to implicit search for libiconv)
685 [[ --with-iconv[=DIR] use libiconv [search in DIR/include and DIR/lib]]],
690 AC_CHECK_HEADERS(iconv.h,
692 AC_CHECK_FUNC(iconv, has_iconv=true)
698 if test -d $withval/include; then
699 CPPFLAGS="$CPPFLAGS -I$withval/include"
700 CFLAGS="$CFLAGS -I$withval/include"
702 if test -d $withval/lib; then
703 LDFLAGS="$LDFLAGS -L$withval/lib"
710 AC_CHECK_HEADERS(iconv.h,
712 AC_CHECK_FUNCS(iconv,
720 if test x$check_iconv = xtrue; then
721 AC_MSG_RESULT(Searching for iconv...)
724 unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
726 AC_CHECK_HEADERS(iconv.h,
729 AC_MSG_CHECKING(for iconv in -liconv)
736 iconv_t cd = iconv_open("", "");
737 iconv(cd, NULL, NULL, NULL, NULL);
742 AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
749 CFLAGS="$SAVE_CFLAGS"
750 LDFLAGS="$SAVE_LDFLAGS"
751 CPPFLAGS="$SAVE_CPPFLAGS"
756 if test x$check_iconv = xtrue; then
757 # search for iconv library..
759 SAVE_CFLAGS="$CFLAGS"
760 SAVE_LDFLAGS="$LDFLAGS"
761 SAVE_CPPFLAGS="$CPPFLAGS"
763 for dir in `echo "/usr/local /usr/pkg /usr/contrib"`; do
764 if test x$has_iconv = xfalse; then
765 AC_MSG_RESULT(searching in $dir...)
767 if test -d $dir/include; then
768 CPPFLAGS="$CPPFLAGS -I$dir/include"
769 CFLAGS="$CFLAGS -I$dir/include"
771 if test -d $dir/lib; then
772 LDFLAGS="$LDFLAGS -L$dir/lib"
776 unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
778 AC_CHECK_HEADERS(iconv.h,
781 AC_MSG_CHECKING(for iconv in -liconv)
788 iconv_t cd = iconv_open("", "");
789 iconv(cd, NULL, NULL, NULL, NULL);
795 AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
802 CFLAGS="$SAVE_CFLAGS"
803 LDFLAGS="$SAVE_LDFLAGS"
804 CPPFLAGS="$SAVE_CPPFLAGS"
808 CFLAGS="$SAVE_CFLAGS"
809 LDFLAGS="$SAVE_LDFLAGS"
810 CPPFLAGS="$SAVE_CPPFLAGS"
816 if test x$has_iconv = xtrue; then
817 # (1) Some implementations of iconv won't convert from UTF-8 to UTF-8.
818 # (2) In glibc-2.1.2 and earlier there is a bug that messes up ob and
819 # obl when args 2 and 3 are 0 (fixed in glibc-2.1.3).
821 AC_CACHE_CHECK([whether this iconv is good enough], ac_iconv_good,
832 ob = buf, obl = sizeof(buf);
833 return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1) &&
834 (iconv(cd, 0, 0, &ob, &obl) ||
835 !(ob == buf && obl == sizeof(buf)) ||
850 if test x$ac_iconv_good = xno; then
851 AC_MSG_RESULT(Try using libiconv instead.)
856 # POSIX threads support
859 AC_MSG_CHECKING(whether to search for POSIX threads)
860 AC_ARG_WITH(pthreads,
861 [[ --with-pthreads[=DIR] use POSIX threads [search in DIR/include and DIR/lib]]],
868 if test -d $withval/include; then
869 CPPFLAGS="$CPPFLAGS -I$withval/include"
870 CFLAGS="$CFLAGS -I$withval/include"
872 if test -d $withval/lib; then
873 LDFLAGS="$LDFLAGS -L$withval/lib"
881 if test x$check_threads = xtrue; then
883 SAVE_CFLAGS="$CFLAGS"
884 SAVE_LDFLAGS="$LDFLAGS"
885 SAVE_CPPFLAGS="$CPPFLAGS"
888 AC_CHECK_HEADERS(pthread.h,
890 LIBS="$LIBS -lpthread"
891 AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
896 LIBS="$SAVE_LIBS -pthread"
897 AC_CHECK_LIB(c_r, pthread_attr_init, has_threads=true, LIBS="$SAVE_LIBS")
906 # search for pthread library..
907 for dir in `echo "/usr/local /usr/pkg /usr/contrib /usr/pkg/pthreads /usr/local/pthreads"`; do
908 if test x$has_threads = xfalse; then
909 AC_MSG_RESULT(searching in $dir...)
911 if test -d $dir/include; then
912 CPPFLAGS="$CPPFLAGS -I$dir/include"
913 CFLAGS="$CFLAGS -I$dir/include"
915 if test -d $dir/lib; then
916 LDFLAGS="$LDFLAGS -L$dir/lib"
920 unset ac_cv_header__pthread_h_ ac_cv_header_pthread_h || true
922 AC_CHECK_HEADERS(pthread.h,
924 LIBS="$LIBS -lpthread"
925 AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
930 CFLAGS="$SAVE_CFLAGS"
931 LDFLAGS="$SAVE_LDFLAGS"
932 CPPFLAGS="$SAVE_CPPFLAGS"
936 CFLAGS="$SAVE_CFLAGS"
937 LDFLAGS="$SAVE_LDFLAGS"
938 CPPFLAGS="$SAVE_CPPFLAGS"
948 __SILC_HAVE_PTHREAD=""
949 AM_CONDITIONAL(SILC_THREADS, test x$has_threads = xtrue)
950 if test x$has_threads = xtrue; then
951 CFLAGS="$CFLAGS -D_REENTRANT"
953 # XXX possibly incomplete
956 CFLAGS="$CFLAGS -D_THREAD_SAFE"
957 if test x"$GCC" = xyes; then
958 CFLAGS="$CFLAGS -mthreads"
962 CFLAGS="$CFLAGS -D_THREAD_SAFE"
964 *-*-sysv5uw7*) # UnixWare 7
965 if test "$GCC" != "yes"; then
966 CFLAGS="$CFLAGS -Kthread"
968 CFLAGS="$CFLAGS -pthread"
972 CFLAGS="$CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
976 AC_CHECK_FUNC(pthread_create)
977 AC_DEFINE([SILC_HAVE_PTHREAD], [], [HAVE_PTHREAD])
978 AC_DEFINE([SILC_THREADS], [], [HAVE_THREAD])
979 __SILC_HAVE_PTHREAD="#define __SILC_HAVE_PTHREAD 1"
982 # Native WIN32 compilation under cygwin
984 AC_MSG_CHECKING(whether to compile native WIN32 code)
986 [ --with-win32 compile native WIN32 (MinGW) code (-mno-cygwin)],
989 AC_DEFINE([SILC_WIN32], [], [SILC_WIN32])
991 CFLAGS="-mno-cygwin $CFLAGS"
992 LIBS="$LIBS -lwsock32"
997 AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
999 # Native EPOC support (disabled by default)
1001 AM_CONDITIONAL(SILC_EPOC, test xfalse = xtrue)
1003 # Native BeOS support (disabled by default)
1005 AM_CONDITIONAL(SILC_BEOS, test xfalse = xtrue)
1007 # Native OS2 support (disabled by default)
1009 AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue)
1011 #ifdef SILC_DIST_TOOLKIT
1016 AC_MSG_CHECKING(whether to compile Irssi SILC Client)
1018 [ --without-irssi compile without Irssi SILC Client],
1030 AC_MSG_CHECKING(whether to compile SILC Server)
1032 [ --without-silcd compile without SILC Server],
1041 #endif SILC_DIST_TOOLKIT
1043 #ifdef SILC_DIST_CLIENT
1044 # Irssi perl support
1047 [[ --with-perl[=yes|no|module] Build with Perl support - also specifies
1048 if it should be built into main silc binary
1049 (static, default) or as a module]])
1050 #endif SILC_DIST_CLIENT
1053 AC_MSG_CHECKING(whether to do libtoolfix)
1054 AC_ARG_WITH(libtoolfix,
1055 [ --without-libtoolfix Do not fix libtool, for package builders],
1065 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
1071 # Other configure scripts
1074 #ifdef SILC_DIST_TOOLKIT
1075 if test x$without_irssi = xfalse; then
1076 #endif SILC_DIST_TOOLKIT
1077 #ifdef SILC_DIST_CLIENT
1078 AC_CONFIG_SUBDIRS(irssi)
1080 #endif SILC_DIST_CLIENT
1081 #ifdef SILC_DIST_TOOLKIT
1083 #endif SILC_DIST_TOOLKIT
1085 SILC_TOP_SRCDIR=`pwd`
1087 # Included configure scripts
1088 AD_INCLUDE_CONFIGURE
1093 AC_SUBST(SILC_TOP_SRCDIR)
1095 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
1096 AC_SUBST(INCLUDE_DEFINES_INT)
1097 AC_SUBST(SILC_LIB_INCLUDES)
1098 AC_SUBST(__SILC_HAVE_PTHREAD)
1099 AC_SUBST(__SILC_HAVE_SIM)
1100 AC_SUBST(__SILC_ENABLE_DEBUG)
1103 # Fix the libtool to support run-time configuration. This allows us
1104 # to in run-time specify when to compile shared/static libraries without
1105 # need to reconfigure the entire libtool.
1107 if test x$libtoolfix = xtrue; then
1108 ./libtoolfix $SILC_TOP_SRCDIR/ltmain.sh
1110 AM_CONDITIONAL(SILC_LIBTOOLFIX, test x$libtoolfix = xtrue)
1118 Makefile.defines_int
1121 doc/example_silcd.conf
1122 includes/silcversion.h
1123 includes/silcincludes.h
1126 #ifdef SILC_DIST_TOOLKIT
1127 if test x$without_irssi = xfalse ; then
1128 #endif SILC_DIST_TOOLKIT
1129 #ifdef SILC_DIST_CLIENT
1131 irssi/Makefile.defines
1132 irssi/Makefile.defines_int
1134 #endif SILC_DIST_CLIENT
1135 #ifdef SILC_DIST_TOOLKIT
1137 #endif SILC_DIST_TOOLKIT
1139 #ifdef SILC_DIST_TOOLKIT
1140 if test x$without_silcd = xfalse ; then
1141 #endif SILC_DIST_TOOLKIT
1142 #ifdef SILC_DIST_SERVER
1143 AC_CONFIG_FILES(silcd/Makefile)
1144 #endif SILC_DIST_SERVER
1145 #ifdef SILC_DIST_TOOLKIT
1147 #endif SILC_DIST_TOOLKIT
1149 #ifdef SILC_DIST_TOOLKIT
1153 win32/libsilc/Makefile
1154 win32/libsilcclient/Makefile
1156 tutorial/Makefile.defines
1157 tutorial/Makefile.defines_int
1159 #endif SILC_DIST_TOOLKIT
1163 s_bindir=`eval echo $bindir`;s_bindir=`eval echo $s_bindir`
1164 s_sbindir=`eval echo $sbindir`;s_sbindir=`eval echo $s_sbindir`
1165 s_mandir=`eval echo $mandir`;s_mandir=`eval echo $s_mandir`
1166 s_includedir=`eval echo $includedir`;s_includedir=`eval echo $s_includedir`
1169 echo "SILC Configuration Summary:"
1170 echo "---------------------------"
1171 echo " Target host ...................: $target"
1172 echo " Compiler ......................: $CC"
1173 echo " CFLAGS ........................: $CFLAGS"
1174 echo " CPPFLAGS ......................: $CPPFLAGS"
1175 echo " LDFLAGS .......................: $LDFLAGS"
1176 echo " LIBS ..........................: $LIBS"
1178 echo " Installation prefix ...........: $prefix"
1179 echo " bin directory .................: $s_bindir"
1180 echo " sbin directory ................: $s_sbindir"
1181 echo " etc directory .................: $ETCDIR"
1182 echo " man directory .................: $s_mandir"
1183 echo " help directory ................: $HELPDIR"
1184 echo " doc directory .................: $DOCDIR"
1185 echo " logs directory ................: $LOGSDIR"
1186 echo " SIM directory .................: $MODULESDIR"
1187 echo " include directory .............: $s_includedir"
1190 #ifdef SILC_DIST_SERVER
1192 #endif SILC_DIST_SERVER
1194 #ifdef SILC_DIST_TOOLKIT
1195 if test x$without_irssi = xtrue; then
1198 if test x$without_silcd = xtrue; then
1201 #endif SILC_DIST_TOOLKIT
1203 #ifdef SILC_DIST_CLIENT
1204 echo " Compile SILC Client ...........: $irssi"
1205 #endif SILC_DIST_CLIENT
1207 #ifdef SILC_DIST_SERVER
1208 echo " Compile SILC Server ...........: $silcd"
1209 echo " Server configuration file .....: $summary_silcd_configfile"
1210 echo " Server PID file ...............: $PIDFILE"
1211 #endif SILC_DIST_SERVER
1213 if test x$sim_support = xfalse; then
1218 if test x$has_iconv = xfalse; then
1223 echo " SIM support ...................: $sim_support"
1224 echo " IPv6 support ..................: $summary_ipv6"
1225 echo " Iconv support .................: $iconv_support"
1226 if test x$want_asm = xfalse; then
1231 echo " Assembler optimizations .......: $summary_asm"
1234 if test x$mp_gmp = xtrue; then
1237 echo " Arithmetic library ............: $mp"
1240 if test x$has_threads = xtrue; then
1243 echo " Multi-threads support .........: $threads"
1244 echo " Debugging enabled .............: $summary_debug"
1246 echo "Compile the sources with 'make' or 'gmake' command."