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
170 ## Enable/disable checking
175 AC_MSG_CHECKING(whether to enable IPv6 support)
177 [ --enable-ipv6 enable IPv6 support],
179 case "${enableval}" in
184 AC_DEFINE([HAVE_IPV6], [], [HAVE_IPV6])
198 if test x$check_ipv6 = xtrue; then
202 #ifdef HAVE_SYS_TYPES_H
203 #include <sys/types.h>
205 #ifdef HAVE_NETINET_TCP_H
206 #include <netinet/tcp.h>
211 #include <sys/socket.h>
212 #ifdef HAVE_NETINET_IN_H
213 #include <netinet/in.h>
217 struct sockaddr_in6 sin6;
218 int family = AF_INET6;
221 AC_DEFINE([HAVE_IPV6], [], [HAVE_IPV6])
231 AC_MSG_CHECKING(whether to enable debugging)
233 __SILC_ENABLE_DEBUG=""
235 [ --enable-debug enable debugging],
237 case "${enableval}" in
240 AC_DEFINE([SILC_DEBUG], [], [enable-debug])
242 __SILC_ENABLE_DEBUG="#define __SILC_ENABLE_DEBUG 1"
253 # Disable all assembler optimizations
255 AC_MSG_CHECKING(whether to enable assembler optimizations)
258 [ --disable-asm do not use assembler optimizations],
269 ## Compiler and compiler flag checks
272 # Function to check if compiler flag works
273 # Usage: SILC_ADD_CFLAGS(FLAGS, [ACTION-IF-FAILED])
274 AC_DEFUN([SILC_ADD_CFLAGS],
275 [ tmp_CFLAGS="$CFLAGS"
277 AC_MSG_CHECKING(whether $CC accepts $1 flag)
278 AC_TRY_LINK([], [], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
284 # Function to check if compiler flag works, destination specifiable
285 # Usage: SILC_ADD_CC_FLAGS(VAR, FLAGS, [ACTION-IF-FAILED])
286 AC_DEFUN([SILC_ADD_CC_FLAGS],
287 [ tmp_CFLAGS="$1_CFLAGS"
288 $1_CFLAGS="${$1_CFLAGS} $2"
289 AC_MSG_CHECKING(whether $CC accepts $2 flag)
290 AC_TRY_LINK([], [], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
291 $1_CFLAGS="$tmp_CFLAGS"
297 # GCC specific options
298 if test "x$summary_debug" = "xyes"; then
299 SILC_ADD_CFLAGS(-g -O)
301 SILC_ADD_CFLAGS(-g -O2)
303 SILC_ADD_CFLAGS(-Wall -finline-functions)
304 SILC_ADD_CFLAGS(-Wno-pointer-sign)
309 SILC_ADD_CFLAGS(-g3 -O2, SILC_ADD_CFLAGS(-g3 -O, SILC_ADD_CFLAGS(-O)))
313 SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
317 # Intel C++ Compiler needs -restrict
318 if test "x$CC" = "xicc"; then
319 SILC_ADD_CFLAGS(-restrict)
324 # Workaround a bug in GCC 2.x which causes memory exhaustion
325 # when compiling sha1 with optimizations on UltraSPARC.
328 if test "$GCC" -a "$host_cpu" = "sparc64"; then
329 AC_MSG_CHECKING(whether to enable GCC 2.x workaround for SHA1)
332 #if defined(__sparc64__) && (__GNUC__ == 2)
346 #endif SILC_DIST_COMPILER
352 # Default installation destination
354 #ifdef SILC_DIST_AUTODIST
355 AC_PREFIX_DEFAULT(/usr/local)
356 #else !SILC_DIST_AUTODIST
357 AC_PREFIX_DEFAULT(/usr/local/silc)
358 #endif SILC_DIST_AUTODIST
359 if test "x$prefix" != xNONE; then
360 silc_prefix="$prefix"
362 silc_prefix="$ac_default_prefix"
365 #ifndef SILC_DIST_AUTODIST
368 if test "x$sysconfdir" != 'x${prefix}/etc'; then
371 ETCDIR="$silc_prefix/etc"
375 [[ --with-etcdir=DIR directory for system files [/etc/silc]]],
386 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
390 DOCDIR="$silc_prefix/doc"
392 [[ --with-docdir=DIR directory for SILC documentation [PREFIX/doc]]],
403 AC_DEFINE_UNQUOTED([SILC_DOCDIR], "$DOCDIR", [SILC_DOCDIR])
404 #endif SILC_DIST_AUTODIST
406 #ifdef SILC_DIST_COMPILER
408 ## With/without checkings
412 # SILC library checking
415 #ifndef SILC_DIST_TOOLKIT
416 AC_ARG_WITH(silc-includes,
417 [ --with-silc-includes=DIR SILC Toolkit includes [search in DIR]],
418 [ac_silc_includes="$withval"], [ac_silc_includes="no"])
419 AC_ARG_WITH(silc-libs,
420 [ --with-silc-libs=DIR SILC Toolkit libraries [search in DIR]],
421 [ac_silc_libs="$withval"], [ac_silc_libs="no"])
423 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
425 # Manually provided libs
426 if test "$ac_silc_includes" != "no"; then
428 SILC_LIB_INCLUDES="-I$ac_silc_includes"
430 if test "$ac_silc_libs" != "no"; then
432 LIBS="$LIBS -L$ac_silc_libs"
435 # Check libs to link against
436 f=`$EGREP __SILC_HAVE_PTHREAD $ac_silc_includes/silcincludes.h`
437 if test -n "$f"; then
438 LIBS="$LIBS -lpthread"
442 f=`$EGREP __SILC_HAVE_SIM $ac_silc_includes/silcincludes.h`
443 if test -n "$f"; then
449 PKG_CHECK_MODULES(SILC, silc, compile_libs=false, compile_libs=true)
450 #ifdef SILC_DIST_CLIENTLIB
451 PKG_CHECK_MODULES(SILCCLIENT, silcclient, compile_libs=false, compile_libs=true)
452 #endif SILC_DIST_CLIENTLIB
454 if test x$compile_libs = xfalse; then
455 LIBS="$LIBS $SILC_LIBS"
456 CFLAGS="$CFLAGS $SILC_CFLAGS"
457 #ifdef SILC_DIST_CLIENTLIB
458 LIBS="$LIBS $SILCCLIENT_LIBS"
459 CFLAGS="$CFLAGS $SILCCLIENT_CFLAGS"
460 #endif SILC_DIST_CLIENTLIB
463 #endif SILC_DIST_TOOLKIT
465 # SOCKS4 support checking
468 SAVE_CFLAGS="$CFLAGS"
469 SAVE_LDFLAGS="$LDFLAGS"
470 AC_MSG_CHECKING(whether to support SOCKS4)
472 [[ --with-socks4[=DIR] with SOCKS4 support [search in DIR/lib and DIR/include]]],
482 if test -d "$withval/include"; then
483 CFLAGS="$CFLAGS -I$withval/include"
485 if test -d "$withval/lib"; then
486 LDFLAGS="$LDFLAGS -L$withval/lib"
498 AC_MSG_ERROR(Could not find SOCKS4 library.)
500 CFLAGS="$SAVE_CFLAGS"
501 LDFLAGS="$SAVE_LDFLAGS"
507 # SOCKS5 support checking
510 SAVE_CFLAGS="$CFLAGS"
511 SAVE_LDFLAGS="$LDFLAGS"
512 AC_MSG_CHECKING(whether to support SOCKS5)
514 [[ --with-socks5[=DIR] with SOCKS5 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"
531 LIBS="-lsocks5 $LIBS"
540 AC_MSG_ERROR(Could not find SOCKS5 library.)
542 CFLAGS="$SAVE_CFLAGS"
543 LDFLAGS="$SAVE_LDFLAGS"
549 if test "x$socks" = "x4"; then
550 AC_DEFINE([SOCKS], [], [Socks])
551 CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
554 if test "x$socks" = "x5"; then
555 AC_DEFINE([SOCKS], [], [Socks])
556 AC_DEFINE([SOCKS5], [], [Socks5])
557 AC_DEFINE([Rconnect], [SOCKSconnect], [Socks])
558 AC_DEFINE([Rgetsockname], [SOCKSgetsockname], [Socks])
559 AC_DEFINE([Rgetpeername], [SOCKSgetpeername], [Socks])
560 AC_DEFINE([Rbind], [SOCKSbind], [Socks])
561 AC_DEFINE([Raccept], [SOCKSaccept], [Socks])
562 AC_DEFINE([Rlisten], [SOCKSlisten], [Socks])
563 AC_DEFINE([Rselect], [SOCKSselect], [Socks])
564 AC_DEFINE([Rrecvfrom], [SOCKSrecvfrom], [Socks])
565 AC_DEFINE([Rsendto], [SOCKSsendto], [Socks])
566 AC_DEFINE([Rrecv], [SOCKSrecv], [Socks])
567 AC_DEFINE([Rsend], [SOCKSsend], [Socks])
568 AC_DEFINE([Rread], [SOCKSread], [Socks])
569 AC_DEFINE([Rwrite], [SOCKSwrite], [Socks])
570 AC_DEFINE([Rrresvport], [SOCKSrresvport], [Socks])
571 AC_DEFINE([Rshutdown], [SOCKSshutdown], [Socks])
572 AC_DEFINE([Rlisten], [SOCKSlisten], [Socks])
573 AC_DEFINE([Rclose], [SOCKSclose], [Socks])
574 AC_DEFINE([Rdup], [SOCKSdup], [Socks])
575 AC_DEFINE([Rdup2], [SOCKSdup2], [Socks])
576 AC_DEFINE([Rfclose], [SOCKSfclose], [Socks])
577 AC_DEFINE([Rgethostbyname], [SOCKSgethostbyname], [Socks])
580 #ifdef SILC_DIST_MATH
581 # MP library checking. First check whether user wants to use GMP and use
582 # it if found. If not or not defined then compile the default library in the
587 SAVE_CFLAGS="$CFLAGS"
588 SAVE_LDFLAGS="$LDFLAGS"
589 AC_MSG_CHECKING(whether to search for GMP)
591 [[ --with-gmp[=DIR] use GMP instead of SILC Math [search in DIR/lib and DIR/include]]],
600 if test -d "$withval/include"; then
601 CFLAGS="$CFLAGS -I$withval/include"
603 if test -d "$withval/lib"; then
604 LDFLAGS="$LDFLAGS -L$withval/lib"
611 AC_CHECK_LIB(gmp, __gmpz_init,
614 AC_DEFINE([SILC_MP_GMP], [], [GMP])
615 AC_MSG_RESULT(Using GMP as a MP library.)
619 CFLAGS="$SAVE_CFLAGS"
620 LDFLAGS="$SAVE_LDFLAGS"
626 AM_CONDITIONAL(SILC_MP_GMP, test x$mp_gmp = xtrue)
627 AM_CONDITIONAL(SILC_MP_SILCMATH, test x$mp_gmp = xfalse)
628 if test x$mp_gmp = xfalse; then
629 AC_DEFINE([SILC_MP_SILCMAP], [], [SILCMATH])
630 AC_MSG_RESULT(Using SILC Math as a MP library.)
632 #endif SILC_DIST_MATH
639 SAVE_CFLAGS="$CFLAGS"
640 SAVE_LDFLAGS="$LDFLAGS"
641 SAVE_CPPFLAGS="$CPPFLAGS"
642 AC_MSG_CHECKING(whether to implicit search for libiconv)
644 [[ --with-iconv[=DIR] use libiconv [search in DIR/include and DIR/lib]]],
649 AC_CHECK_HEADERS(iconv.h,
651 AC_CHECK_FUNC(iconv, has_iconv=true)
657 if test -d $withval/include; then
658 CPPFLAGS="$CPPFLAGS -I$withval/include"
659 CFLAGS="$CFLAGS -I$withval/include"
661 if test -d $withval/lib; then
662 LDFLAGS="$LDFLAGS -L$withval/lib"
669 AC_CHECK_HEADERS(iconv.h,
671 AC_CHECK_FUNCS(iconv,
679 if test x$check_iconv = xtrue; then
680 AC_MSG_RESULT(Searching for iconv...)
683 unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
685 AC_CHECK_HEADERS(iconv.h,
688 AC_MSG_CHECKING(for iconv in -liconv)
695 iconv_t cd = iconv_open("", "");
696 iconv(cd, NULL, NULL, NULL, NULL);
701 AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
708 CFLAGS="$SAVE_CFLAGS"
709 LDFLAGS="$SAVE_LDFLAGS"
710 CPPFLAGS="$SAVE_CPPFLAGS"
715 if test x$check_iconv = xtrue; then
716 # search for iconv library..
718 SAVE_CFLAGS="$CFLAGS"
719 SAVE_LDFLAGS="$LDFLAGS"
720 SAVE_CPPFLAGS="$CPPFLAGS"
722 for dir in `echo "/usr/local /usr/pkg /usr/contrib"`; do
723 if test x$has_iconv = xfalse; then
724 AC_MSG_RESULT(searching in $dir...)
726 if test -d $dir/include; then
727 CPPFLAGS="$CPPFLAGS -I$dir/include"
728 CFLAGS="$CFLAGS -I$dir/include"
730 if test -d $dir/lib; then
731 LDFLAGS="$LDFLAGS -L$dir/lib"
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);
754 AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
761 CFLAGS="$SAVE_CFLAGS"
762 LDFLAGS="$SAVE_LDFLAGS"
763 CPPFLAGS="$SAVE_CPPFLAGS"
767 CFLAGS="$SAVE_CFLAGS"
768 LDFLAGS="$SAVE_LDFLAGS"
769 CPPFLAGS="$SAVE_CPPFLAGS"
775 if test x$has_iconv = xtrue; then
776 # (1) Some implementations of iconv won't convert from UTF-8 to UTF-8.
777 # (2) In glibc-2.1.2 and earlier there is a bug that messes up ob and
778 # obl when args 2 and 3 are 0 (fixed in glibc-2.1.3).
780 AC_CACHE_CHECK([whether this iconv is good enough], ac_iconv_good,
791 ob = buf, obl = sizeof(buf);
792 return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1) &&
793 (iconv(cd, 0, 0, &ob, &obl) ||
794 !(ob == buf && obl == sizeof(buf)) ||
809 if test x$ac_iconv_good = xno; then
810 AC_MSG_RESULT(Try using libiconv instead.)
814 # POSIX threads support
816 AC_MSG_CHECKING(whether to search for POSIX threads)
817 AC_ARG_WITH(pthreads,
818 [[ --with-pthreads[=DIR] use POSIX threads [search in DIR/include and DIR/lib]]],
825 if test -d $withval/include; then
826 CPPFLAGS="$CPPFLAGS -I$withval/include"
827 CFLAGS="$CFLAGS -I$withval/include"
829 if test -d $withval/lib; then
830 LDFLAGS="$LDFLAGS -L$withval/lib"
838 if test x$check_threads = xtrue; then
841 SAVE_CFLAGS="$CFLAGS"
842 SAVE_LDFLAGS="$LDFLAGS"
843 SAVE_CPPFLAGS="$CPPFLAGS"
846 AC_CHECK_HEADERS(pthread.h,
848 LIBS="$LIBS -lpthread"
849 AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
854 LIBS="$SAVE_LIBS -pthread"
855 AC_CHECK_LIB(c_r, pthread_attr_init, has_threads=true, LIBS="$SAVE_LIBS")
864 # search for pthread library..
865 for dir in `echo "/usr/local /usr/pkg /usr/contrib /usr/pkg/pthreads /usr/local/pthreads"`; do
866 if test x$has_threads = xfalse; then
867 AC_MSG_RESULT(searching in $dir...)
869 if test -d $dir/include; then
870 CPPFLAGS="$CPPFLAGS -I$dir/include"
871 CFLAGS="$CFLAGS -I$dir/include"
873 if test -d $dir/lib; then
874 LDFLAGS="$LDFLAGS -L$dir/lib"
878 unset ac_cv_header__pthread_h_ ac_cv_header_pthread_h || true
880 AC_CHECK_HEADERS(pthread.h,
882 LIBS="$LIBS -lpthread"
883 AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
888 CFLAGS="$SAVE_CFLAGS"
889 LDFLAGS="$SAVE_LDFLAGS"
890 CPPFLAGS="$SAVE_CPPFLAGS"
894 CFLAGS="$SAVE_CFLAGS"
895 LDFLAGS="$SAVE_LDFLAGS"
896 CPPFLAGS="$SAVE_CPPFLAGS"
906 __SILC_HAVE_PTHREAD=""
907 AM_CONDITIONAL(SILC_THREADS, test x$has_threads = xtrue)
908 if test x$has_threads = xtrue; then
909 CFLAGS="$CFLAGS -D_REENTRANT"
911 # XXX possibly incomplete
914 CFLAGS="$CFLAGS -D_THREAD_SAFE"
915 if test x"$GCC" = xyes; then
916 CFLAGS="$CFLAGS -mthreads"
920 CFLAGS="$CFLAGS -D_THREAD_SAFE"
922 *-*-sysv5uw7*) # UnixWare 7
923 if test "$GCC" != "yes"; then
924 CFLAGS="$CFLAGS -Kthread"
926 CFLAGS="$CFLAGS -pthread"
930 CFLAGS="$CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
934 AC_CHECK_FUNC(pthread_create)
935 AC_DEFINE([SILC_HAVE_PTHREAD], [], [HAVE_PTHREAD])
936 AC_DEFINE([SILC_THREADS], [], [HAVE_THREAD])
937 __SILC_HAVE_PTHREAD="#define __SILC_HAVE_PTHREAD 1"
940 # Native WIN32 compilation under cygwin
942 AC_MSG_CHECKING(whether to compile native WIN32 code)
944 [ --with-win32 compile native WIN32 (MinGW) code (-mno-cygwin)],
947 AC_DEFINE([SILC_WIN32], [], [SILC_WIN32])
949 CFLAGS="-mno-cygwin $CFLAGS"
950 LIBS="$LIBS -lwsock32"
955 AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
957 # Native EPOC support (disabled by default)
959 AM_CONDITIONAL(SILC_EPOC, test xfalse = xtrue)
961 # Native BeOS support (disabled by default)
963 AM_CONDITIONAL(SILC_BEOS, test xfalse = xtrue)
965 # Native OS2 support (disabled by default)
967 AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue)
969 #ifdef SILC_DIST_TOOLKIT
973 AC_MSG_CHECKING(whether to compile Irssi SILC Client)
975 [ --without-irssi compile without Irssi SILC Client],
987 AC_MSG_CHECKING(whether to compile SILC Server)
989 [ --without-silcd compile without SILC Server],
997 #endif SILC_DIST_TOOLKIT
1000 AC_MSG_CHECKING(whether to do libtoolfix)
1001 AC_ARG_WITH(libtoolfix,
1002 [ --without-libtoolfix Do not fix libtool, for package builders],
1012 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
1013 #endif SILC_DIST_COMPILER
1019 # Make enable-shared aware
1020 AM_CONDITIONAL(SILC_ENABLE_SHARED, test "$enable_shared" = yes)
1022 SILC_TOP_SRCDIR=`pwd`
1024 # Included configure scripts
1025 AD_INCLUDE_CONFIGURE
1027 #ifdef SILC_DIST_COMPILER
1031 AC_SUBST(SILC_TOP_SRCDIR)
1033 AC_SUBST(SILC_LIB_INCLUDES)
1034 AC_SUBST(__SILC_HAVE_PTHREAD)
1035 AC_SUBST(__SILC_HAVE_SIM)
1036 AC_SUBST(__SILC_ENABLE_DEBUG)
1039 # Fix the libtool to support run-time configuration. This allows us
1040 # to in run-time specify when to compile shared/static libraries without
1041 # need to reconfigure the entire libtool.
1043 if test x$libtoolfix = xtrue; then
1044 ./libtoolfix $SILC_TOP_SRCDIR/ltmain.sh
1046 AM_CONDITIONAL(SILC_LIBTOOLFIX, test x$libtoolfix = xtrue)
1048 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
1049 AC_SUBST(INCLUDE_DEFINES_INT)
1051 #endif SILC_DIST_COMPILER
1058 #ifdef SILC_DIST_DOC
1060 #endif SILC_DIST_DOC
1061 #ifdef SILC_DIST_COMPILER
1063 Makefile.defines_int
1065 includes/silcversion.h
1066 includes/silcincludes.h
1067 #endif SILC_DIST_COMPILER
1068 #ifdef SILC_DIST_APPS
1070 #endif SILC_DIST_APPS
1073 #ifdef SILC_DIST_TOOLKIT
1076 win32/libsilc/Makefile
1077 win32/libsilcclient/Makefile
1079 tutorial/Makefile.defines
1080 tutorial/Makefile.defines_int
1082 #endif SILC_DIST_TOOLKIT
1086 #ifdef SILC_DIST_COMPILER
1087 s_bindir=`eval echo $bindir`;s_bindir=`eval echo $s_bindir`
1088 s_sbindir=`eval echo $sbindir`;s_sbindir=`eval echo $s_sbindir`
1089 s_mandir=`eval echo $mandir`;s_mandir=`eval echo $s_mandir`
1090 s_includedir=`eval echo $includedir`;s_includedir=`eval echo $s_includedir`
1093 echo "$PACKAGE Configuration Summary:"
1094 echo "---------------------------"
1095 echo " Target host ...................: $target"
1096 echo " Compiler ......................: $CC"
1097 echo " CFLAGS ........................: $CFLAGS"
1098 echo " LDFLAGS .......................: $LDFLAGS"
1099 echo " LIBS ..........................: $LIBS"
1101 echo " Installation prefix ...........: $prefix"
1102 echo " bin directory .................: $s_bindir"
1103 echo " sbin directory ................: $s_sbindir"
1104 echo " etc directory .................: $ETCDIR"
1105 echo " man directory .................: $s_mandir"
1106 echo " doc directory .................: $DOCDIR"
1107 #ifdef SILC_DIST_CLIENT
1108 echo " help directory ................: $HELPDIR"
1109 #endif SILC_DIST_CLIENT
1110 #ifdef SILC_DIST_SERVER
1111 echo " logs directory ................: $LOGSDIR"
1112 #endif SILC_DIST_SERVER
1113 #ifdef SILC_DIST_SIM
1114 echo " SIM directory .................: $MODULESDIR"
1115 #endif SILC_DIST_SIM
1116 #ifdef SILC_DIST_INCLUDES
1117 echo " include directory .............: $s_includedir"
1118 #endif SILC_DIST_INCLUDES
1121 #ifdef SILC_DIST_TOOLKIT
1122 if test x$without_irssi = xtrue; then
1125 if test x$without_silcd = xtrue; then
1128 #endif SILC_DIST_TOOLKIT
1130 #ifdef SILC_DIST_CLIENT
1131 echo " Compile SILC Client ...........: $irssi"
1132 #endif SILC_DIST_CLIENT
1134 #ifdef SILC_DIST_SERVER
1135 echo " Compile SILC Server ...........: $silcd"
1136 echo " Server configuration file .....: $summary_silcd_configfile"
1137 echo " Server PID file ...............: $PIDFILE"
1138 #endif SILC_DIST_SERVER
1140 #ifdef SILC_DIST_SIM
1141 if test x$sim_support = xfalse; then
1146 echo " SIM support ...................: $sim_support"
1147 #endif SILC_DIST_SIM
1149 echo " IPv6 support ..................: $summary_ipv6"
1151 if test x$has_iconv = xfalse; then
1156 echo " Iconv support .................: $iconv_support"
1158 if test x$want_asm = xfalse; then
1163 echo " Assembler optimizations .......: $summary_asm"
1165 #ifdef SILC_DIST_MATH
1166 if test x$mp_gmp = xtrue; then
1167 echo " Arithmetic library ............: GMP"
1169 #endif SILC_DIST_MATH
1172 if test x$has_threads = xtrue; then
1175 echo " Multi-threads support .........: $threads"
1176 echo " Debugging enabled .............: $summary_debug"
1178 echo "Compile the sources with 'make' or 'gmake' command."
1179 #endif SILC_DIST_COMPILER