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)
30 AC_PATH_PROG(sedpath, sed)
32 #ifdef SILC_DIST_COMPILER
33 # Put here any platform specific stuff
47 # Control compiler optimizations
48 CFLAGS=`echo $CFLAGS | sed 's/-O[ 0123456789s]*//g'`
54 __SILC_HAVE_PTHREAD=""
56 __SILC_ENABLE_DEBUG=""
68 # More header checking
70 AC_CHECK_HEADERS(unistd.h string.h getopt.h errno.h fcntl.h assert.h)
71 AC_CHECK_HEADERS(sys/types.h sys/stat.h sys/time.h stddef.h)
72 AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h xti.h netdb.h sys/resource.h)
73 AC_CHECK_HEADERS(pwd.h grp.h termcap.h paths.h)
74 AC_CHECK_HEADERS(ncurses.h signal.h ctype.h utime.h)
75 AC_CHECK_HEADERS(arpa/inet.h sys/mman.h limits.h termios.h locale.h langinfo.h)
85 AC_CHECK_SIZEOF(long long, 0)
86 AC_SUBST(SILC_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long)
87 AC_CHECK_SIZEOF(long, 0)
88 AC_SUBST(SILC_SIZEOF_LONG, $ac_cv_sizeof_long)
89 AC_CHECK_SIZEOF(int, 0)
90 AC_SUBST(SILC_SIZEOF_INT, $ac_cv_sizeof_int)
91 AC_CHECK_SIZEOF(short, 0)
92 AC_SUBST(SILC_SIZEOF_SHORT, $ac_cv_sizeof_short)
93 AC_CHECK_SIZEOF(char, 0)
94 AC_SUBST(SILC_SIZEOF_CHAR, $ac_cv_sizeof_char)
95 AC_CHECK_SIZEOF(void *, 0)
96 AC_SUBST(SILC_SIZEOF_VOID_P, $ac_cv_sizeof_void_p)
98 # Function and library checking
100 AC_CHECK_FUNC(gethostbyname, [],
102 AC_CHECK_LIB(nsl, gethostbyname, LIBS="$LIBS -lnsl")
103 AC_CHECK_FUNC(res_gethostbyname, [],
104 AC_CHECK_LIB(resolv, res_gethostbyname, LIBS="$LIBS -lresolv")
107 AC_CHECK_FUNC(socket, [],
108 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
110 AC_CHECK_FUNCS(gethostname gethostbyaddr getservbyname getservbyport)
111 AC_CHECK_FUNCS(select listen bind shutdown close connect setsockopt)
112 AC_CHECK_FUNCS(time ctime utime gettimeofday getrusage)
113 AC_CHECK_FUNCS(chmod fcntl stat fstat getenv putenv strerror)
114 AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid)
115 AC_CHECK_FUNCS(setgroups initgroups nl_langinfo)
116 AC_CHECK_FUNCS(strchr strstr strcpy strncpy memcpy memset memmove)
119 # SIM support checking
120 # XXX These needs to be changed as more supported platforms appear.
121 # XXX This probably needs to be made platform dependant check.
124 AC_MSG_CHECKING(for SIM support)
126 AC_CHECK_HEADERS(dlfcn.h,
128 AC_CHECK_LIB(dl, dlopen,
130 AC_DEFINE([SILC_SIM], [], [HAVE_SIM])
135 AC_CHECK_LIB(c, dlopen,
137 AC_DEFINE([SILC_SIM], [], [HAVE_SIM])
143 AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue)
144 if test x$sim_support = xtrue; then
145 AC_MSG_RESULT(Enabled SIM support.)
146 __SILC_HAVE_SIM="#define __SILC_HAVE_SIM 1"
148 AC_MSG_RESULT(No SIM support found.)
152 # lib/contrib conditionals
154 AC_CHECK_HEADER(regex.h,
156 AC_DEFINE([HAVE_REGEX], [], [HAVE_REGEX])
160 AM_CONDITIONAL(HAVE_REGEX, test x$have_regex = x1)
162 AC_CHECK_FUNC(getopt_long,
164 AC_DEFINE([HAVE_GETOPT_LONG], [], [HAVE_GETOPT_LONG])
166 ], have_getopt_long=0
168 AM_CONDITIONAL(HAVE_GETOPT_LONG, test x$have_getopt_long = x1)
171 ## Enable/disable checking
176 AC_MSG_CHECKING(whether to enable IPv6 support)
178 [ --enable-ipv6 enable IPv6 support],
180 case "${enableval}" in
185 AC_DEFINE([HAVE_IPV6], [], [HAVE_IPV6])
199 if test x$check_ipv6 = xtrue; then
203 #ifdef HAVE_SYS_TYPES_H
204 #include <sys/types.h>
206 #ifdef HAVE_NETINET_TCP_H
207 #include <netinet/tcp.h>
212 #include <sys/socket.h>
213 #ifdef HAVE_NETINET_IN_H
214 #include <netinet/in.h>
218 struct sockaddr_in6 sin6;
219 int family = AF_INET6;
222 AC_DEFINE([HAVE_IPV6], [], [HAVE_IPV6])
232 AC_MSG_CHECKING(whether to enable debugging)
234 __SILC_ENABLE_DEBUG=""
236 [ --enable-debug enable debugging],
238 case "${enableval}" in
241 AC_DEFINE([SILC_DEBUG], [], [enable-debug])
243 __SILC_ENABLE_DEBUG="#define __SILC_ENABLE_DEBUG 1"
254 # Disable all assembler optimizations
256 AC_MSG_CHECKING(whether to enable assembler optimizations)
259 [ --disable-asm do not use assembler optimizations],
270 ## Compiler and compiler flag checks
273 # Function to check if compiler flag works
274 # Usage: SILC_ADD_CFLAGS(FLAGS, [ACTION-IF-FAILED])
275 AC_DEFUN([SILC_ADD_CFLAGS],
276 [ tmp_CFLAGS="$CFLAGS"
278 AC_MSG_CHECKING(whether $CC accepts $1 flag)
279 AC_TRY_LINK([], [], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
286 # GCC specific options
287 if test "x$summary_debug" = "xyes"; then
288 SILC_ADD_CFLAGS(-g -O)
290 SILC_ADD_CFLAGS(-g -O2)
292 SILC_ADD_CFLAGS(-Wall -finline-functions)
293 SILC_ADD_CFLAGS(-Wno-pointer-sign)
298 SILC_ADD_CFLAGS(-g3 -O2, SILC_ADD_CFLAGS(-g3 -O, SILC_ADD_CFLAGS(-O)))
302 SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
306 # Intel C++ Compiler needs -restrict
307 if test "x$CC" = "xicc"; then
308 SILC_ADD_CFLAGS(-restrict)
313 # Workaround a bug in GCC 2.x which causes memory exhaustion
314 # when compiling sha1 with optimizations on UltraSPARC.
317 if test "$GCC" -a "$host_cpu" = "sparc64"; then
318 AC_MSG_CHECKING(whether to enable GCC 2.x workaround for SHA1)
321 #if defined(__sparc64__) && (__GNUC__ == 2)
335 #endif SILC_DIST_COMPILER
341 # Default installation destination
343 #ifdef SILC_DIST_AUTODIST
344 AC_PREFIX_DEFAULT(/usr/local)
345 #else !SILC_DIST_AUTODIST
346 AC_PREFIX_DEFAULT(/usr/local/silc)
347 #endif SILC_DIST_AUTODIST
348 if test "x$prefix" != xNONE; then
349 silc_prefix="$prefix"
351 silc_prefix="$ac_default_prefix"
354 #ifndef SILC_DIST_AUTODIST
357 if test "x$sysconfdir" != 'x${prefix}/etc'; then
360 ETCDIR="$silc_prefix/etc"
364 [[ --with-etcdir=DIR directory for system files [/etc/silc]]],
375 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
379 DOCDIR="$silc_prefix/doc"
381 [[ --with-docdir=DIR directory for SILC documentation [PREFIX/doc]]],
392 AC_DEFINE_UNQUOTED([SILC_DOCDIR], "$DOCDIR", [SILC_DOCDIR])
393 #endif SILC_DIST_AUTODIST
395 #ifdef SILC_DIST_CLIENT
398 HELPDIR="$silc_prefix/help"
400 [[ --with-helpdir=DIR directory for SILC help files [PREFIX/help]]],
411 AC_DEFINE_UNQUOTED([SILC_HELPDIR], "$HELPDIR", [SILC_HELPDIR])
412 #endif SILC_DIST_CLIENT
415 # SIM modules directory
417 MODULESDIR="$silc_prefix/modules"
419 [[ --with-simdir=DIR directory for SIM modules [PREFIX/modules]]],
425 MODULESDIR="$withval"
430 AC_DEFINE_UNQUOTED([SILC_MODULESDIR], "$MODULESDIR", [SILC_MODULESDIR])
433 #ifdef SILC_DIST_COMPILER
435 ## With/without checkings
439 # SILC library checking
442 #ifndef SILC_DIST_TOOLKIT
443 AC_ARG_WITH(silc-includes,
444 [ --with-silc-includes=DIR SILC Toolkit includes [search in DIR]],
445 [ac_silc_includes="$withval"], [ac_silc_includes="no"])
446 AC_ARG_WITH(silc-libs,
447 [ --with-silc-libs=DIR SILC Toolkit libraries [search in DIR]],
448 [ac_silc_libs="$withval"], [ac_silc_libs="no"])
450 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
452 # Manually provided libs
453 if test "$ac_silc_includes" != "no"; then
455 SILC_LIB_INCLUDES="-I$ac_silc_includes"
457 if test "$ac_silc_libs" != "no"; then
459 LIBS="$LIBS -L$ac_silc_libs"
462 # Check libs to link against
463 f=`$EGREP __SILC_HAVE_PTHREAD $ac_silc_includes/silcincludes.h`
464 if test -n "$f"; then
465 LIBS="$LIBS -lpthread"
469 f=`$EGREP __SILC_HAVE_SIM $ac_silc_includes/silcincludes.h`
470 if test -n "$f"; then
476 PKG_CHECK_MODULES(SILC, silc, compile_libs=false, compile_libs=true)
477 PKG_CHECK_MODULES(SILCCLIENT, silcclient, compile_libs=false, compile_libs=true)
479 if test x$compile_libs = xfalse; then
480 LIBS="$LIBS $SILC_LIBS"
481 CFLAGS="$CFLAGS $SILC_CFLAGS"
482 LIBS="$LIBS $SILCCLIENT_LIBS"
483 CFLAGS="$CFLAGS $SILCCLIENT_CFLAGS"
486 #endif SILC_DIST_TOOLKIT
488 # SOCKS4 support checking
491 SAVE_CFLAGS="$CFLAGS"
492 SAVE_LDFLAGS="$LDFLAGS"
493 AC_MSG_CHECKING(whether to support SOCKS4)
495 [[ --with-socks4[=DIR] with SOCKS4 support [search in DIR/lib and DIR/include]]],
505 if test -d "$withval/include"; then
506 CFLAGS="$CFLAGS -I$withval/include"
508 if test -d "$withval/lib"; then
509 LDFLAGS="$LDFLAGS -L$withval/lib"
521 AC_MSG_ERROR(Could not find SOCKS4 library.)
523 CFLAGS="$SAVE_CFLAGS"
524 LDFLAGS="$SAVE_LDFLAGS"
530 # SOCKS5 support checking
533 SAVE_CFLAGS="$CFLAGS"
534 SAVE_LDFLAGS="$LDFLAGS"
535 AC_MSG_CHECKING(whether to support SOCKS5)
537 [[ --with-socks5[=DIR] with SOCKS5 support [search in DIR/lib and DIR/include]]],
547 if test -d "$withval/include"; then
548 CFLAGS="$CFLAGS -I$withval/include"
550 if test -d "$withval/lib"; then
551 LDFLAGS="$LDFLAGS -L$withval/lib"
554 LIBS="-lsocks5 $LIBS"
563 AC_MSG_ERROR(Could not find SOCKS5 library.)
565 CFLAGS="$SAVE_CFLAGS"
566 LDFLAGS="$SAVE_LDFLAGS"
572 if test "x$socks" = "x4"; then
573 AC_DEFINE([SOCKS], [], [Socks])
574 CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
577 if test "x$socks" = "x5"; then
578 AC_DEFINE([SOCKS], [], [Socks])
579 AC_DEFINE([SOCKS5], [], [Socks5])
580 AC_DEFINE([Rconnect], [SOCKSconnect], [Socks])
581 AC_DEFINE([Rgetsockname], [SOCKSgetsockname], [Socks])
582 AC_DEFINE([Rgetpeername], [SOCKSgetpeername], [Socks])
583 AC_DEFINE([Rbind], [SOCKSbind], [Socks])
584 AC_DEFINE([Raccept], [SOCKSaccept], [Socks])
585 AC_DEFINE([Rlisten], [SOCKSlisten], [Socks])
586 AC_DEFINE([Rselect], [SOCKSselect], [Socks])
587 AC_DEFINE([Rrecvfrom], [SOCKSrecvfrom], [Socks])
588 AC_DEFINE([Rsendto], [SOCKSsendto], [Socks])
589 AC_DEFINE([Rrecv], [SOCKSrecv], [Socks])
590 AC_DEFINE([Rsend], [SOCKSsend], [Socks])
591 AC_DEFINE([Rread], [SOCKSread], [Socks])
592 AC_DEFINE([Rwrite], [SOCKSwrite], [Socks])
593 AC_DEFINE([Rrresvport], [SOCKSrresvport], [Socks])
594 AC_DEFINE([Rshutdown], [SOCKSshutdown], [Socks])
595 AC_DEFINE([Rlisten], [SOCKSlisten], [Socks])
596 AC_DEFINE([Rclose], [SOCKSclose], [Socks])
597 AC_DEFINE([Rdup], [SOCKSdup], [Socks])
598 AC_DEFINE([Rdup2], [SOCKSdup2], [Socks])
599 AC_DEFINE([Rfclose], [SOCKSfclose], [Socks])
600 AC_DEFINE([Rgethostbyname], [SOCKSgethostbyname], [Socks])
603 #ifdef SILC_DIST_MATH
604 # MP library checking. First check whether user wants to use GMP and use
605 # it if found. If not or not defined then compile the MPI library in the
610 SAVE_CFLAGS="$CFLAGS"
611 SAVE_LDFLAGS="$LDFLAGS"
612 AC_MSG_CHECKING(whether to search for GMP)
614 [[ --with-gmp[=DIR] use GMP instead of MPI [search in DIR/lib and DIR/include]]],
623 if test -d "$withval/include"; then
624 CFLAGS="$CFLAGS -I$withval/include"
626 if test -d "$withval/lib"; then
627 LDFLAGS="$LDFLAGS -L$withval/lib"
634 AC_CHECK_LIB(gmp, __gmpz_init,
637 AC_DEFINE([SILC_MP_GMP], [], [GMP])
638 AC_MSG_RESULT(Using GMP as a MP library.)
642 CFLAGS="$SAVE_CFLAGS"
643 LDFLAGS="$SAVE_LDFLAGS"
649 AM_CONDITIONAL(SILC_MP_GMP, test x$mp_gmp = xtrue)
650 AM_CONDITIONAL(SILC_MP_NSS_MPI, test x$mp_gmp = xfalse)
651 if test x$mp_gmp = xfalse; then
652 AC_DEFINE([SILC_MP_NSS_MPI], [], [MPI])
653 AC_MSG_RESULT(Using NSS MPI as a MP library.)
655 #endif SILC_DIST_MATH
662 SAVE_CFLAGS="$CFLAGS"
663 SAVE_LDFLAGS="$LDFLAGS"
664 SAVE_CPPFLAGS="$CPPFLAGS"
665 AC_MSG_CHECKING(whether to implicit search for libiconv)
667 [[ --with-iconv[=DIR] use libiconv [search in DIR/include and DIR/lib]]],
672 AC_CHECK_HEADERS(iconv.h,
674 AC_CHECK_FUNC(iconv, has_iconv=true)
680 if test -d $withval/include; then
681 CPPFLAGS="$CPPFLAGS -I$withval/include"
682 CFLAGS="$CFLAGS -I$withval/include"
684 if test -d $withval/lib; then
685 LDFLAGS="$LDFLAGS -L$withval/lib"
692 AC_CHECK_HEADERS(iconv.h,
694 AC_CHECK_FUNCS(iconv,
702 if test x$check_iconv = xtrue; then
703 AC_MSG_RESULT(Searching for iconv...)
706 unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
708 AC_CHECK_HEADERS(iconv.h,
711 AC_MSG_CHECKING(for iconv in -liconv)
718 iconv_t cd = iconv_open("", "");
719 iconv(cd, NULL, NULL, NULL, NULL);
724 AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
731 CFLAGS="$SAVE_CFLAGS"
732 LDFLAGS="$SAVE_LDFLAGS"
733 CPPFLAGS="$SAVE_CPPFLAGS"
738 if test x$check_iconv = xtrue; then
739 # search for iconv library..
741 SAVE_CFLAGS="$CFLAGS"
742 SAVE_LDFLAGS="$LDFLAGS"
743 SAVE_CPPFLAGS="$CPPFLAGS"
745 for dir in `echo "/usr/local /usr/pkg /usr/contrib"`; do
746 if test x$has_iconv = xfalse; then
747 AC_MSG_RESULT(searching in $dir...)
749 if test -d $dir/include; then
750 CPPFLAGS="$CPPFLAGS -I$dir/include"
751 CFLAGS="$CFLAGS -I$dir/include"
753 if test -d $dir/lib; then
754 LDFLAGS="$LDFLAGS -L$dir/lib"
758 unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
760 AC_CHECK_HEADERS(iconv.h,
763 AC_MSG_CHECKING(for iconv in -liconv)
770 iconv_t cd = iconv_open("", "");
771 iconv(cd, NULL, NULL, NULL, NULL);
777 AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
784 CFLAGS="$SAVE_CFLAGS"
785 LDFLAGS="$SAVE_LDFLAGS"
786 CPPFLAGS="$SAVE_CPPFLAGS"
790 CFLAGS="$SAVE_CFLAGS"
791 LDFLAGS="$SAVE_LDFLAGS"
792 CPPFLAGS="$SAVE_CPPFLAGS"
798 if test x$has_iconv = xtrue; then
799 # (1) Some implementations of iconv won't convert from UTF-8 to UTF-8.
800 # (2) In glibc-2.1.2 and earlier there is a bug that messes up ob and
801 # obl when args 2 and 3 are 0 (fixed in glibc-2.1.3).
803 AC_CACHE_CHECK([whether this iconv is good enough], ac_iconv_good,
814 ob = buf, obl = sizeof(buf);
815 return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1) &&
816 (iconv(cd, 0, 0, &ob, &obl) ||
817 !(ob == buf && obl == sizeof(buf)) ||
832 if test x$ac_iconv_good = xno; then
833 AC_MSG_RESULT(Try using libiconv instead.)
837 # POSIX threads support
839 AC_MSG_CHECKING(whether to search for POSIX threads)
840 AC_ARG_WITH(pthreads,
841 [[ --with-pthreads[=DIR] use POSIX threads [search in DIR/include and DIR/lib]]],
848 if test -d $withval/include; then
849 CPPFLAGS="$CPPFLAGS -I$withval/include"
850 CFLAGS="$CFLAGS -I$withval/include"
852 if test -d $withval/lib; then
853 LDFLAGS="$LDFLAGS -L$withval/lib"
861 if test x$check_threads = xtrue; then
864 SAVE_CFLAGS="$CFLAGS"
865 SAVE_LDFLAGS="$LDFLAGS"
866 SAVE_CPPFLAGS="$CPPFLAGS"
869 AC_CHECK_HEADERS(pthread.h,
871 LIBS="$LIBS -lpthread"
872 AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
877 LIBS="$SAVE_LIBS -pthread"
878 AC_CHECK_LIB(c_r, pthread_attr_init, has_threads=true, LIBS="$SAVE_LIBS")
887 # search for pthread library..
888 for dir in `echo "/usr/local /usr/pkg /usr/contrib /usr/pkg/pthreads /usr/local/pthreads"`; do
889 if test x$has_threads = xfalse; then
890 AC_MSG_RESULT(searching in $dir...)
892 if test -d $dir/include; then
893 CPPFLAGS="$CPPFLAGS -I$dir/include"
894 CFLAGS="$CFLAGS -I$dir/include"
896 if test -d $dir/lib; then
897 LDFLAGS="$LDFLAGS -L$dir/lib"
901 unset ac_cv_header__pthread_h_ ac_cv_header_pthread_h || true
903 AC_CHECK_HEADERS(pthread.h,
905 LIBS="$LIBS -lpthread"
906 AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
911 CFLAGS="$SAVE_CFLAGS"
912 LDFLAGS="$SAVE_LDFLAGS"
913 CPPFLAGS="$SAVE_CPPFLAGS"
917 CFLAGS="$SAVE_CFLAGS"
918 LDFLAGS="$SAVE_LDFLAGS"
919 CPPFLAGS="$SAVE_CPPFLAGS"
929 __SILC_HAVE_PTHREAD=""
930 AM_CONDITIONAL(SILC_THREADS, test x$has_threads = xtrue)
931 if test x$has_threads = xtrue; then
932 CFLAGS="$CFLAGS -D_REENTRANT"
934 # XXX possibly incomplete
937 CFLAGS="$CFLAGS -D_THREAD_SAFE"
938 if test x"$GCC" = xyes; then
939 CFLAGS="$CFLAGS -mthreads"
943 CFLAGS="$CFLAGS -D_THREAD_SAFE"
945 *-*-sysv5uw7*) # UnixWare 7
946 if test "$GCC" != "yes"; then
947 CFLAGS="$CFLAGS -Kthread"
949 CFLAGS="$CFLAGS -pthread"
953 CFLAGS="$CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
957 AC_CHECK_FUNC(pthread_create)
958 AC_DEFINE([SILC_HAVE_PTHREAD], [], [HAVE_PTHREAD])
959 AC_DEFINE([SILC_THREADS], [], [HAVE_THREAD])
960 __SILC_HAVE_PTHREAD="#define __SILC_HAVE_PTHREAD 1"
963 # Native WIN32 compilation under cygwin
965 AC_MSG_CHECKING(whether to compile native WIN32 code)
967 [ --with-win32 compile native WIN32 (MinGW) code (-mno-cygwin)],
970 AC_DEFINE([SILC_WIN32], [], [SILC_WIN32])
972 CFLAGS="-mno-cygwin $CFLAGS"
973 LIBS="$LIBS -lwsock32"
978 AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
980 # Native EPOC support (disabled by default)
982 AM_CONDITIONAL(SILC_EPOC, test xfalse = xtrue)
984 # Native BeOS support (disabled by default)
986 AM_CONDITIONAL(SILC_BEOS, test xfalse = xtrue)
988 # Native OS2 support (disabled by default)
990 AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue)
992 #ifdef SILC_DIST_TOOLKIT
996 AC_MSG_CHECKING(whether to compile Irssi SILC Client)
998 [ --without-irssi compile without Irssi SILC Client],
1010 AC_MSG_CHECKING(whether to compile SILC Server)
1012 [ --without-silcd compile without SILC Server],
1020 #endif SILC_DIST_TOOLKIT
1022 #ifdef SILC_DIST_CLIENT
1023 # Irssi perl support
1026 [[ --with-perl[=yes|no|module] Build with Perl support - also specifies
1027 if it should be built into main silc binary
1028 (static, default) or as a module]])
1029 #endif SILC_DIST_CLIENT
1032 AC_MSG_CHECKING(whether to do libtoolfix)
1033 AC_ARG_WITH(libtoolfix,
1034 [ --without-libtoolfix Do not fix libtool, for package builders],
1044 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
1046 #endif SILC_DIST_COMPILER
1052 # Make enable-shared aware
1053 AM_CONDITIONAL(SILC_ENABLE_SHARED, test "$enable_shared" = yes)
1055 # Other configure scripts
1058 #ifdef SILC_DIST_TOOLKIT
1059 if test x$without_irssi = xfalse; then
1060 #endif SILC_DIST_TOOLKIT
1061 #ifdef SILC_DIST_CLIENT
1062 AC_CONFIG_SUBDIRS(irssi)
1064 #endif SILC_DIST_CLIENT
1065 #ifdef SILC_DIST_TOOLKIT
1067 #endif SILC_DIST_TOOLKIT
1069 SILC_TOP_SRCDIR=`pwd`
1071 # Included configure scripts
1072 AD_INCLUDE_CONFIGURE
1074 #ifdef SILC_DIST_COMPILER
1078 AC_SUBST(SILC_TOP_SRCDIR)
1080 AC_SUBST(SILC_LIB_INCLUDES)
1081 AC_SUBST(__SILC_HAVE_PTHREAD)
1082 AC_SUBST(__SILC_HAVE_SIM)
1083 AC_SUBST(__SILC_ENABLE_DEBUG)
1086 # Fix the libtool to support run-time configuration. This allows us
1087 # to in run-time specify when to compile shared/static libraries without
1088 # need to reconfigure the entire libtool.
1090 if test x$libtoolfix = xtrue; then
1091 ./libtoolfix $SILC_TOP_SRCDIR/ltmain.sh
1093 AM_CONDITIONAL(SILC_LIBTOOLFIX, test x$libtoolfix = xtrue)
1095 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
1096 AC_SUBST(INCLUDE_DEFINES_INT)
1098 #endif SILC_DIST_COMPILER
1105 #ifdef SILC_DIST_DOC
1107 #endif SILC_DIST_DOC
1108 #ifdef SILC_DIST_COMPILER
1110 Makefile.defines_int
1112 includes/silcversion.h
1113 includes/silcincludes.h
1114 #endif SILC_DIST_COMPILER
1115 #ifdef SILC_DIST_APPS
1117 #endif SILC_DIST_APPS
1120 #ifdef SILC_DIST_TOOLKIT
1121 if test x$without_irssi = xfalse ; then
1122 #endif SILC_DIST_TOOLKIT
1123 #ifdef SILC_DIST_CLIENT
1125 irssi/Makefile.defines
1126 irssi/Makefile.defines_int
1128 #endif SILC_DIST_CLIENT
1129 #ifdef SILC_DIST_TOOLKIT
1131 #endif SILC_DIST_TOOLKIT
1133 #ifdef SILC_DIST_TOOLKIT
1137 win32/libsilc/Makefile
1138 win32/libsilcclient/Makefile
1140 tutorial/Makefile.defines
1141 tutorial/Makefile.defines_int
1143 #endif SILC_DIST_TOOLKIT
1147 #ifdef SILC_DIST_COMPILER
1148 s_bindir=`eval echo $bindir`;s_bindir=`eval echo $s_bindir`
1149 s_sbindir=`eval echo $sbindir`;s_sbindir=`eval echo $s_sbindir`
1150 s_mandir=`eval echo $mandir`;s_mandir=`eval echo $s_mandir`
1151 s_includedir=`eval echo $includedir`;s_includedir=`eval echo $s_includedir`
1154 echo "$PACKAGE Configuration Summary:"
1155 echo "---------------------------"
1156 echo " Target host ...................: $target"
1157 echo " Compiler ......................: $CC"
1158 echo " CFLAGS ........................: $CFLAGS"
1159 echo " LDFLAGS .......................: $LDFLAGS"
1160 echo " LIBS ..........................: $LIBS"
1162 echo " Installation prefix ...........: $prefix"
1163 echo " bin directory .................: $s_bindir"
1164 echo " sbin directory ................: $s_sbindir"
1165 echo " etc directory .................: $ETCDIR"
1166 echo " man directory .................: $s_mandir"
1167 echo " doc directory .................: $DOCDIR"
1168 #ifdef SILC_DIST_CLIENT
1169 echo " help directory ................: $HELPDIR"
1170 #endif SILC_DIST_CLIENT
1171 #ifdef SILC_DIST_SERVER
1172 echo " logs directory ................: $LOGSDIR"
1173 #endif SILC_DIST_SERVER
1174 #ifdef SILC_DIST_SIM
1175 echo " SIM directory .................: $MODULESDIR"
1176 #endif SILC_DIST_SIM
1177 #ifdef SILC_DIST_INCLUDES
1178 echo " include directory .............: $s_includedir"
1179 #endif SILC_DIST_INCLUDES
1182 #ifdef SILC_DIST_TOOLKIT
1183 if test x$without_irssi = xtrue; then
1186 if test x$without_silcd = xtrue; then
1189 #endif SILC_DIST_TOOLKIT
1191 #ifdef SILC_DIST_CLIENT
1192 echo " Compile SILC Client ...........: $irssi"
1193 #endif SILC_DIST_CLIENT
1195 #ifdef SILC_DIST_SERVER
1196 echo " Compile SILC Server ...........: $silcd"
1197 echo " Server configuration file .....: $summary_silcd_configfile"
1198 echo " Server PID file ...............: $PIDFILE"
1199 #endif SILC_DIST_SERVER
1201 #ifdef SILC_DIST_SIM
1202 if test x$sim_support = xfalse; then
1207 echo " SIM support ...................: $sim_support"
1208 #endif SILC_DIST_SIM
1210 echo " IPv6 support ..................: $summary_ipv6"
1212 if test x$has_iconv = xfalse; then
1217 echo " Iconv support .................: $iconv_support"
1219 if test x$want_asm = xfalse; then
1224 echo " Assembler optimizations .......: $summary_asm"
1226 #ifdef SILC_DIST_MATH
1228 if test x$mp_gmp = xtrue; then
1231 echo " Arithmetic library ............: $mp"
1232 #endif SILC_DIST_MATH
1235 if test x$has_threads = xtrue; then
1238 echo " Multi-threads support .........: $threads"
1239 echo " Debugging enabled .............: $summary_debug"
1241 echo "Compile the sources with 'make' or 'gmake' command."
1242 #endif SILC_DIST_COMPILER