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.
19 AD_ENABLE_DEPENDENCIES
23 AC_CONFIG_HEADERS(silcdefs.h)
31 AC_PATH_PROG(sedpath, sed)
33 #ifdef SILC_DIST_COMPILER
34 # Put here any platform specific stuff
48 # Control compiler optimizations
49 CFLAGS=`echo $CFLAGS | sed 's/-O[ 0123456789s]*//g'`
55 __SILC_HAVE_PTHREAD=""
57 __SILC_ENABLE_DEBUG=""
69 # More header checking
71 AC_CHECK_HEADERS(unistd.h string.h getopt.h errno.h fcntl.h assert.h)
72 AC_CHECK_HEADERS(sys/types.h sys/stat.h sys/time.h stddef.h)
73 AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h xti.h netdb.h sys/resource.h)
74 AC_CHECK_HEADERS(pwd.h grp.h termcap.h paths.h)
75 AC_CHECK_HEADERS(ncurses.h signal.h ctype.h utime.h)
76 AC_CHECK_HEADERS(arpa/inet.h sys/mman.h limits.h termios.h locale.h langinfo.h)
86 AC_CHECK_SIZEOF(long long, 0)
87 AC_SUBST(SILC_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long)
88 AC_CHECK_SIZEOF(long, 0)
89 AC_SUBST(SILC_SIZEOF_LONG, $ac_cv_sizeof_long)
90 AC_CHECK_SIZEOF(int, 0)
91 AC_SUBST(SILC_SIZEOF_INT, $ac_cv_sizeof_int)
92 AC_CHECK_SIZEOF(short, 0)
93 AC_SUBST(SILC_SIZEOF_SHORT, $ac_cv_sizeof_short)
94 AC_CHECK_SIZEOF(char, 0)
95 AC_SUBST(SILC_SIZEOF_CHAR, $ac_cv_sizeof_char)
96 AC_CHECK_SIZEOF(void *, 0)
97 AC_SUBST(SILC_SIZEOF_VOID_P, $ac_cv_sizeof_void_p)
99 # Function and library checking
101 AC_CHECK_FUNC(gethostbyname, [],
103 AC_CHECK_LIB(nsl, gethostbyname, LIBS="$LIBS -lnsl")
104 AC_CHECK_FUNC(res_gethostbyname, [],
105 AC_CHECK_LIB(resolv, res_gethostbyname, LIBS="$LIBS -lresolv")
108 AC_CHECK_FUNC(socket, [],
109 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
111 AC_CHECK_FUNCS(gethostname gethostbyaddr getservbyname getservbyport)
112 AC_CHECK_FUNCS(select listen bind shutdown close connect setsockopt)
113 AC_CHECK_FUNCS(time ctime utime gettimeofday getrusage)
114 AC_CHECK_FUNCS(chmod fcntl stat fstat getenv putenv strerror)
115 AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid)
116 AC_CHECK_FUNCS(setgroups initgroups nl_langinfo)
117 AC_CHECK_FUNCS(strchr strstr strcpy strncpy memcpy memset memmove)
120 # SIM support checking
121 # XXX These needs to be changed as more supported platforms appear.
122 # XXX This probably needs to be made platform dependant check.
125 AC_MSG_CHECKING(for SIM support)
127 AC_CHECK_HEADERS(dlfcn.h,
129 AC_CHECK_LIB(dl, dlopen,
131 AC_DEFINE([SILC_SIM], [], [HAVE_SIM])
136 AC_CHECK_LIB(c, dlopen,
138 AC_DEFINE([SILC_SIM], [], [HAVE_SIM])
144 AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue)
145 if test x$sim_support = xtrue; then
146 AC_MSG_RESULT(Enabled SIM support.)
147 __SILC_HAVE_SIM="#define __SILC_HAVE_SIM 1"
149 AC_MSG_RESULT(No SIM support found.)
153 # lib/contrib conditionals
155 AC_CHECK_HEADER(regex.h,
157 AC_DEFINE([HAVE_REGEX], [], [HAVE_REGEX])
161 AM_CONDITIONAL(HAVE_REGEX, test x$have_regex = x1)
163 AC_CHECK_FUNC(getopt_long,
165 AC_DEFINE([HAVE_GETOPT_LONG], [], [HAVE_GETOPT_LONG])
167 ], have_getopt_long=0
170 AC_CHECK_FUNC(getopt,
172 AC_DEFINE([HAVE_GETOPT], [], [HAVE_GETOPT])
178 ## Enable/disable checking
183 AC_MSG_CHECKING(whether to enable IPv6 support)
185 [ --enable-ipv6 enable IPv6 support],
187 case "${enableval}" in
192 AC_DEFINE([HAVE_IPV6], [], [HAVE_IPV6])
206 if test x$check_ipv6 = xtrue; then
210 #ifdef HAVE_SYS_TYPES_H
211 #include <sys/types.h>
213 #ifdef HAVE_NETINET_TCP_H
214 #include <netinet/tcp.h>
219 #include <sys/socket.h>
220 #ifdef HAVE_NETINET_IN_H
221 #include <netinet/in.h>
225 struct sockaddr_in6 sin6;
226 int family = AF_INET6;
229 AC_DEFINE([HAVE_IPV6], [], [HAVE_IPV6])
239 AC_MSG_CHECKING(whether to enable debugging)
241 __SILC_ENABLE_DEBUG=""
243 [ --enable-debug enable debugging],
245 case "${enableval}" in
248 AC_DEFINE([SILC_DEBUG], [], [enable-debug])
250 __SILC_ENABLE_DEBUG="#define __SILC_ENABLE_DEBUG 1"
261 # Disable all assembler optimizations
263 AC_MSG_CHECKING(whether to enable assembler optimizations)
266 [ --disable-asm do not use assembler optimizations],
277 ## Compiler and compiler flag checks
280 # Function to check if compiler flag works
281 # Usage: SILC_ADD_CFLAGS(FLAGS, [ACTION-IF-FAILED])
282 AC_DEFUN([SILC_ADD_CFLAGS],
283 [ tmp_CFLAGS="$CFLAGS"
285 AC_MSG_CHECKING(whether $CC accepts $1 flag)
286 AC_TRY_LINK([], [], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
292 # Function to check if compiler flag works, destination specifiable
293 # Usage: SILC_ADD_CC_FLAGS(VAR, FLAGS, [ACTION-IF-FAILED])
294 AC_DEFUN([SILC_ADD_CC_FLAGS],
295 [ tmp_CFLAGS="$1_CFLAGS"
296 $1_CFLAGS="${$1_CFLAGS} $2"
297 AC_MSG_CHECKING(whether $CC accepts $2 flag)
298 AC_TRY_LINK([], [], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
299 $1_CFLAGS="$tmp_CFLAGS"
305 # GCC specific options
306 if test "x$summary_debug" = "xyes"; then
307 SILC_ADD_CFLAGS(-g -O)
309 SILC_ADD_CFLAGS(-g -O2)
311 SILC_ADD_CFLAGS(-Wall -finline-functions)
312 SILC_ADD_CFLAGS(-Wno-pointer-sign)
317 SILC_ADD_CFLAGS(-g3 -O2, SILC_ADD_CFLAGS(-g3 -O, SILC_ADD_CFLAGS(-O)))
320 SILC_ADD_CFLAGS(-g3 -O2, SILC_ADD_CFLAGS(-g3 -O, SILC_ADD_CFLAGS(-O)))
324 SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
328 # Intel C++ Compiler needs -restrict
329 if test "x$CC" = "xicc"; then
330 SILC_ADD_CFLAGS(-restrict)
335 # Workaround a bug in GCC 2.x which causes memory exhaustion
336 # when compiling sha1 with optimizations on UltraSPARC.
339 if test "$GCC" -a "$host_cpu" = "sparc64"; then
340 AC_MSG_CHECKING(whether to enable GCC 2.x workaround for SHA1)
343 #if defined(__sparc64__) && (__GNUC__ == 2)
357 #endif SILC_DIST_COMPILER
363 # Default installation destination
365 #ifdef SILC_DIST_AUTODIST
366 AC_PREFIX_DEFAULT(/usr/local)
367 #else !SILC_DIST_AUTODIST
368 AC_PREFIX_DEFAULT(/usr/local/silc)
369 #endif SILC_DIST_AUTODIST
370 if test "x$prefix" != xNONE; then
371 silc_prefix="$prefix"
373 silc_prefix="$ac_default_prefix"
376 #ifndef SILC_DIST_AUTODIST
379 if test "x$sysconfdir" != 'x${prefix}/etc'; then
382 ETCDIR="$silc_prefix/etc"
386 [[ --with-etcdir=DIR directory for system files [/etc/silc]]],
397 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
401 DOCDIR="$silc_prefix/doc"
403 [[ --with-docdir=DIR directory for SILC documentation [PREFIX/doc]]],
414 AC_DEFINE_UNQUOTED([SILC_DOCDIR], "$DOCDIR", [SILC_DOCDIR])
415 #endif SILC_DIST_AUTODIST
417 #ifdef SILC_DIST_COMPILER
419 ## With/without checkings
423 # SILC library checking
427 #ifndef SILC_DIST_TOOLKIT
428 AC_ARG_WITH(silc-includes,
429 [ --with-silc-includes=DIR SILC Toolkit includes [search in DIR]],
430 [ac_silc_includes="$withval"], [ac_silc_includes="no"])
431 AC_ARG_WITH(silc-libs,
432 [ --with-silc-libs=DIR SILC Toolkit libraries [search in DIR]],
433 [ac_silc_libs="$withval"], [ac_silc_libs="no"])
435 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
437 # Manually provided libs
438 if test "$ac_silc_includes" != "no"; then
440 SILC_LIB_INCLUDES="-I$ac_silc_includes"
443 if test "$ac_silc_libs" != "no"; then
446 LIBS="$LIBS -L$ac_silc_libs"
449 # Check libs to link against
450 f=`$EGREP __SILC_HAVE_PTHREAD $ac_silc_includes/silcincludes.h`
451 if test -n "$f"; then
452 LIBS="$LIBS -lpthread"
456 f=`$EGREP __SILC_HAVE_SIM $ac_silc_includes/silcincludes.h`
457 if test -n "$f"; then
463 PKG_CHECK_MODULES(SILC, silc, compile_libs=false, compile_libs=true)
464 #ifdef SILC_DIST_CLIENTLIB
465 PKG_CHECK_MODULES(SILCCLIENT, silcclient, compile_libs=false, compile_libs=true)
466 #endif SILC_DIST_CLIENTLIB
468 if test x$compile_libs = xfalse; then
470 LIBS="$LIBS $SILC_LIBS"
471 CFLAGS="$CFLAGS $SILC_CFLAGS"
472 #ifdef SILC_DIST_CLIENTLIB
473 LIBS="$LIBS $SILCCLIENT_LIBS"
474 CFLAGS="$CFLAGS $SILCCLIENT_CFLAGS"
475 #endif SILC_DIST_CLIENTLIB
478 #endif SILC_DIST_TOOLKIT
482 # SOCKS4 support checking
485 SAVE_CFLAGS="$CFLAGS"
486 SAVE_LDFLAGS="$LDFLAGS"
487 AC_MSG_CHECKING(whether to support SOCKS4)
489 [[ --with-socks4[=DIR] with SOCKS4 support [search in DIR/lib and DIR/include]]],
499 if test -d "$withval/include"; then
500 CFLAGS="$CFLAGS -I$withval/include"
502 if test -d "$withval/lib"; then
503 LDFLAGS="$LDFLAGS -L$withval/lib"
515 AC_MSG_ERROR(Could not find SOCKS4 library.)
517 CFLAGS="$SAVE_CFLAGS"
518 LDFLAGS="$SAVE_LDFLAGS"
524 # SOCKS5 support checking
527 SAVE_CFLAGS="$CFLAGS"
528 SAVE_LDFLAGS="$LDFLAGS"
529 AC_MSG_CHECKING(whether to support SOCKS5)
531 [[ --with-socks5[=DIR] with SOCKS5 support [search in DIR/lib and DIR/include]]],
541 if test -d "$withval/include"; then
542 CFLAGS="$CFLAGS -I$withval/include"
544 if test -d "$withval/lib"; then
545 LDFLAGS="$LDFLAGS -L$withval/lib"
548 LIBS="-lsocks5 $LIBS"
557 AC_MSG_ERROR(Could not find SOCKS5 library.)
559 CFLAGS="$SAVE_CFLAGS"
560 LDFLAGS="$SAVE_LDFLAGS"
566 if test "x$socks" = "x4"; then
567 AC_DEFINE([SOCKS], [], [Socks])
568 CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
571 if test "x$socks" = "x5"; then
572 AC_DEFINE([SOCKS], [], [Socks])
573 AC_DEFINE([SOCKS5], [], [Socks5])
574 AC_DEFINE([Rconnect], [SOCKSconnect], [Socks])
575 AC_DEFINE([Rgetsockname], [SOCKSgetsockname], [Socks])
576 AC_DEFINE([Rgetpeername], [SOCKSgetpeername], [Socks])
577 AC_DEFINE([Rbind], [SOCKSbind], [Socks])
578 AC_DEFINE([Raccept], [SOCKSaccept], [Socks])
579 AC_DEFINE([Rlisten], [SOCKSlisten], [Socks])
580 AC_DEFINE([Rselect], [SOCKSselect], [Socks])
581 AC_DEFINE([Rrecvfrom], [SOCKSrecvfrom], [Socks])
582 AC_DEFINE([Rsendto], [SOCKSsendto], [Socks])
583 AC_DEFINE([Rrecv], [SOCKSrecv], [Socks])
584 AC_DEFINE([Rsend], [SOCKSsend], [Socks])
585 AC_DEFINE([Rread], [SOCKSread], [Socks])
586 AC_DEFINE([Rwrite], [SOCKSwrite], [Socks])
587 AC_DEFINE([Rrresvport], [SOCKSrresvport], [Socks])
588 AC_DEFINE([Rshutdown], [SOCKSshutdown], [Socks])
589 AC_DEFINE([Rlisten], [SOCKSlisten], [Socks])
590 AC_DEFINE([Rclose], [SOCKSclose], [Socks])
591 AC_DEFINE([Rdup], [SOCKSdup], [Socks])
592 AC_DEFINE([Rdup2], [SOCKSdup2], [Socks])
593 AC_DEFINE([Rfclose], [SOCKSfclose], [Socks])
594 AC_DEFINE([Rgethostbyname], [SOCKSgethostbyname], [Socks])
597 #ifdef SILC_DIST_MATH
598 # MP library checking. First check whether user wants to use GMP and use
599 # it if found. If not or not defined then compile the default library in the
604 SAVE_CFLAGS="$CFLAGS"
605 SAVE_LDFLAGS="$LDFLAGS"
606 AC_MSG_CHECKING(whether to search for GMP)
608 [[ --with-gmp[=DIR] use GMP instead of SILC Math [search in DIR/lib and DIR/include]]],
617 if test -d "$withval/include"; then
618 CFLAGS="$CFLAGS -I$withval/include"
620 if test -d "$withval/lib"; then
621 LDFLAGS="$LDFLAGS -L$withval/lib"
628 AC_CHECK_LIB(gmp, __gmpz_init,
631 AC_DEFINE([SILC_MP_GMP], [], [GMP])
632 AC_MSG_RESULT(Using GMP as a MP library.)
636 CFLAGS="$SAVE_CFLAGS"
637 LDFLAGS="$SAVE_LDFLAGS"
643 AM_CONDITIONAL(SILC_MP_GMP, test x$mp_gmp = xtrue)
644 AM_CONDITIONAL(SILC_MP_SILCMATH, test x$mp_gmp = xfalse)
645 if test x$mp_gmp = xfalse; then
646 AC_DEFINE([SILC_MP_SILCMAP], [], [SILCMATH])
647 AC_MSG_RESULT(Using SILC Math as a MP library.)
649 #endif SILC_DIST_MATH
656 SAVE_CFLAGS="$CFLAGS"
657 SAVE_LDFLAGS="$LDFLAGS"
658 SAVE_CPPFLAGS="$CPPFLAGS"
659 AC_MSG_CHECKING(whether to implicit search for libiconv)
661 [[ --with-iconv[=DIR] use libiconv [search in DIR/include and DIR/lib]]],
666 AC_CHECK_HEADERS(iconv.h,
668 AC_CHECK_FUNC(iconv, has_iconv=true)
674 if test -d $withval/include; then
675 CPPFLAGS="$CPPFLAGS -I$withval/include"
676 CFLAGS="$CFLAGS -I$withval/include"
678 if test -d $withval/lib; then
679 LDFLAGS="$LDFLAGS -L$withval/lib"
686 AC_CHECK_HEADERS(iconv.h,
688 AC_CHECK_FUNCS(iconv,
696 if test x$check_iconv = xtrue; then
697 AC_MSG_RESULT(Searching for iconv...)
700 unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
702 AC_CHECK_HEADERS(iconv.h,
705 AC_MSG_CHECKING(for iconv in -liconv)
712 iconv_t cd = iconv_open("", "");
713 iconv(cd, NULL, NULL, NULL, NULL);
718 AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
725 CFLAGS="$SAVE_CFLAGS"
726 LDFLAGS="$SAVE_LDFLAGS"
727 CPPFLAGS="$SAVE_CPPFLAGS"
732 if test x$check_iconv = xtrue; then
733 # search for iconv library..
735 SAVE_CFLAGS="$CFLAGS"
736 SAVE_LDFLAGS="$LDFLAGS"
737 SAVE_CPPFLAGS="$CPPFLAGS"
739 for dir in `echo "/usr/local /usr/pkg /usr/contrib"`; do
740 if test x$has_iconv = xfalse; then
741 AC_MSG_RESULT(searching in $dir...)
743 if test -d $dir/include; then
744 CPPFLAGS="$CPPFLAGS -I$dir/include"
745 CFLAGS="$CFLAGS -I$dir/include"
747 if test -d $dir/lib; then
748 LDFLAGS="$LDFLAGS -L$dir/lib"
752 unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
754 AC_CHECK_HEADERS(iconv.h,
757 AC_MSG_CHECKING(for iconv in -liconv)
764 iconv_t cd = iconv_open("", "");
765 iconv(cd, NULL, NULL, NULL, NULL);
771 AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
778 CFLAGS="$SAVE_CFLAGS"
779 LDFLAGS="$SAVE_LDFLAGS"
780 CPPFLAGS="$SAVE_CPPFLAGS"
784 CFLAGS="$SAVE_CFLAGS"
785 LDFLAGS="$SAVE_LDFLAGS"
786 CPPFLAGS="$SAVE_CPPFLAGS"
792 if test x$has_iconv = xtrue; then
793 # (1) Some implementations of iconv won't convert from UTF-8 to UTF-8.
794 # (2) In glibc-2.1.2 and earlier there is a bug that messes up ob and
795 # obl when args 2 and 3 are 0 (fixed in glibc-2.1.3).
797 AC_CACHE_CHECK([whether this iconv is good enough], ac_iconv_good,
808 ob = buf, obl = sizeof(buf);
809 return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1) &&
810 (iconv(cd, 0, 0, &ob, &obl) ||
811 !(ob == buf && obl == sizeof(buf)) ||
826 if test x$ac_iconv_good = xno; then
827 AC_MSG_RESULT(Try using libiconv instead.)
831 # POSIX threads support
833 AC_MSG_CHECKING(whether to search for POSIX threads)
834 AC_ARG_WITH(pthreads,
835 [[ --with-pthreads[=DIR] use POSIX threads [search in DIR/include and DIR/lib]]],
842 if test -d $withval/include; then
843 CPPFLAGS="$CPPFLAGS -I$withval/include"
844 CFLAGS="$CFLAGS -I$withval/include"
846 if test -d $withval/lib; then
847 LDFLAGS="$LDFLAGS -L$withval/lib"
855 if test x$check_threads = xtrue; then
858 SAVE_CFLAGS="$CFLAGS"
859 SAVE_LDFLAGS="$LDFLAGS"
860 SAVE_CPPFLAGS="$CPPFLAGS"
863 AC_CHECK_HEADERS(pthread.h,
865 LIBS="$LIBS -lpthread"
866 AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
871 LIBS="$SAVE_LIBS -pthread"
872 AC_CHECK_LIB(c_r, pthread_attr_init, has_threads=true, LIBS="$SAVE_LIBS")
881 # search for pthread library..
882 for dir in `echo "/usr/local /usr/pkg /usr/contrib /usr/pkg/pthreads /usr/local/pthreads"`; do
883 if test x$has_threads = xfalse; then
884 AC_MSG_RESULT(searching in $dir...)
886 if test -d $dir/include; then
887 CPPFLAGS="$CPPFLAGS -I$dir/include"
888 CFLAGS="$CFLAGS -I$dir/include"
890 if test -d $dir/lib; then
891 LDFLAGS="$LDFLAGS -L$dir/lib"
895 unset ac_cv_header__pthread_h_ ac_cv_header_pthread_h || true
897 AC_CHECK_HEADERS(pthread.h,
899 LIBS="$LIBS -lpthread"
900 AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
905 CFLAGS="$SAVE_CFLAGS"
906 LDFLAGS="$SAVE_LDFLAGS"
907 CPPFLAGS="$SAVE_CPPFLAGS"
911 CFLAGS="$SAVE_CFLAGS"
912 LDFLAGS="$SAVE_LDFLAGS"
913 CPPFLAGS="$SAVE_CPPFLAGS"
923 __SILC_HAVE_PTHREAD=""
924 AM_CONDITIONAL(SILC_THREADS, test x$has_threads = xtrue)
925 if test x$has_threads = xtrue; then
926 CFLAGS="$CFLAGS -D_REENTRANT"
928 # XXX possibly incomplete
931 CFLAGS="$CFLAGS -D_THREAD_SAFE"
932 if test x"$GCC" = xyes; then
933 CFLAGS="$CFLAGS -mthreads"
937 CFLAGS="$CFLAGS -D_THREAD_SAFE"
939 *-*-sysv5uw7*) # UnixWare 7
940 if test "$GCC" != "yes"; then
941 CFLAGS="$CFLAGS -Kthread"
943 CFLAGS="$CFLAGS -pthread"
947 CFLAGS="$CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
951 AC_CHECK_FUNC(pthread_create)
952 AC_DEFINE([SILC_HAVE_PTHREAD], [], [HAVE_PTHREAD])
953 AC_DEFINE([SILC_THREADS], [], [HAVE_THREAD])
954 __SILC_HAVE_PTHREAD="#define __SILC_HAVE_PTHREAD 1"
957 # Native WIN32 compilation under cygwin
959 AC_MSG_CHECKING(whether to compile native WIN32 code)
961 [ --with-win32 compile native WIN32 (MinGW) code (-mno-cygwin)],
964 AC_DEFINE([SILC_WIN32], [], [SILC_WIN32])
966 CFLAGS="-mno-cygwin $CFLAGS"
967 LIBS="$LIBS -lwsock32"
972 AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
974 # Native EPOC support (disabled by default)
976 AM_CONDITIONAL(SILC_EPOC, test xfalse = xtrue)
978 # Native BeOS support (disabled by default)
980 AM_CONDITIONAL(SILC_BEOS, test xfalse = xtrue)
982 # Native OS2 support (disabled by default)
984 AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue)
986 #ifdef SILC_DIST_TOOLKIT
990 AC_MSG_CHECKING(whether to compile Irssi SILC Client)
992 [ --without-irssi compile without Irssi SILC Client],
1004 AC_MSG_CHECKING(whether to compile SILC Server)
1006 [ --without-silcd compile without SILC Server],
1014 #endif SILC_DIST_TOOLKIT
1017 AC_MSG_CHECKING(whether to do libtoolfix)
1018 AC_ARG_WITH(libtoolfix,
1019 [ --without-libtoolfix Do not fix libtool, for package builders],
1029 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
1030 #endif SILC_DIST_COMPILER
1036 # Make enable-shared aware
1037 AM_CONDITIONAL(SILC_ENABLE_SHARED, test "$enable_shared" = yes)
1039 SILC_TOP_SRCDIR=`pwd`
1041 # Included configure scripts
1042 AD_INCLUDE_CONFIGURE
1044 #ifdef SILC_DIST_COMPILER
1048 AC_SUBST(SILC_TOP_SRCDIR)
1050 AC_SUBST(SILC_LIB_INCLUDES)
1051 AC_SUBST(__SILC_HAVE_PTHREAD)
1052 AC_SUBST(__SILC_HAVE_SIM)
1053 AC_SUBST(__SILC_ENABLE_DEBUG)
1056 # Fix the libtool to support run-time configuration. This allows us
1057 # to in run-time specify when to compile shared/static libraries without
1058 # need to reconfigure the entire libtool.
1060 if test x$libtoolfix = xtrue; then
1061 ./libtoolfix $SILC_TOP_SRCDIR/ltmain.sh
1063 AM_CONDITIONAL(SILC_LIBTOOLFIX, test x$libtoolfix = xtrue)
1065 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
1066 AC_SUBST(INCLUDE_DEFINES_INT)
1068 #endif SILC_DIST_COMPILER
1075 #ifdef SILC_DIST_DOC
1077 #endif SILC_DIST_DOC
1078 #ifdef SILC_DIST_COMPILER
1080 Makefile.defines_int
1082 includes/silcversion.h
1083 includes/silcincludes.h
1084 #endif SILC_DIST_COMPILER
1085 #ifdef SILC_DIST_APPS
1087 #endif SILC_DIST_APPS
1090 #ifdef SILC_DIST_TOOLKIT
1093 win32/libsilc/Makefile
1094 win32/libsilcclient/Makefile
1096 tutorial/Makefile.defines
1097 tutorial/Makefile.defines_int
1099 #endif SILC_DIST_TOOLKIT
1103 #ifdef SILC_DIST_COMPILER
1104 s_bindir=`eval echo $bindir`;s_bindir=`eval echo $s_bindir`
1105 s_sbindir=`eval echo $sbindir`;s_sbindir=`eval echo $s_sbindir`
1106 s_mandir=`eval echo $mandir`;s_mandir=`eval echo $s_mandir`
1107 s_includedir=`eval echo $includedir`;s_includedir=`eval echo $s_includedir`
1110 echo "$PACKAGE Configuration Summary:"
1111 echo "---------------------------"
1112 echo " Target host ...................: $target"
1113 echo " Compiler ......................: $CC"
1114 echo " CFLAGS ........................: $CFLAGS"
1115 echo " LDFLAGS .......................: $LDFLAGS"
1116 echo " LIBS ..........................: $LIBS"
1118 echo " Installation prefix ...........: $prefix"
1119 echo " bin directory .................: $s_bindir"
1120 echo " sbin directory ................: $s_sbindir"
1121 echo " etc directory .................: $ETCDIR"
1122 echo " man directory .................: $s_mandir"
1123 echo " doc directory .................: $DOCDIR"
1124 #ifdef SILC_DIST_CLIENT
1125 echo " help directory ................: $HELPDIR"
1126 #endif SILC_DIST_CLIENT
1127 #ifdef SILC_DIST_SERVER
1128 echo " logs directory ................: $LOGSDIR"
1129 #endif SILC_DIST_SERVER
1130 #ifdef SILC_DIST_SIM
1131 echo " SIM directory .................: $MODULESDIR"
1132 #endif SILC_DIST_SIM
1133 #ifdef SILC_DIST_INCLUDES
1134 echo " include directory .............: $s_includedir"
1135 #endif SILC_DIST_INCLUDES
1138 #ifdef SILC_DIST_TOOLKIT
1139 if test x$without_irssi = xtrue; then
1142 if test x$without_silcd = xtrue; then
1145 #endif SILC_DIST_TOOLKIT
1147 #ifdef SILC_DIST_CLIENT
1148 echo " Compile SILC Client ...........: $irssi"
1149 #endif SILC_DIST_CLIENT
1151 #ifdef SILC_DIST_SERVER
1152 echo " Compile SILC Server ...........: $silcd"
1153 echo " Server configuration file .....: $summary_silcd_configfile"
1154 echo " Server PID file ...............: $PIDFILE"
1155 #endif SILC_DIST_SERVER
1157 #ifdef SILC_DIST_SIM
1158 if test x$sim_support = xfalse; then
1163 echo " SIM support ...................: $sim_support"
1164 #endif SILC_DIST_SIM
1166 echo " IPv6 support ..................: $summary_ipv6"
1168 if test x$has_iconv = xfalse; then
1173 echo " Iconv support .................: $iconv_support"
1175 if test x$want_asm = xfalse; then
1180 echo " Assembler optimizations .......: $summary_asm"
1182 #ifdef SILC_DIST_MATH
1183 if test x$mp_gmp = xtrue; then
1184 echo " Arithmetic library ............: GMP"
1186 #endif SILC_DIST_MATH
1189 if test x$has_threads = xtrue; then
1192 echo " Multi-threads support .........: $threads"
1193 echo " Debugging enabled .............: $summary_debug"
1195 echo "Compile the sources with 'make' or 'gmake' command."
1196 #endif SILC_DIST_COMPILER