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)
118 # SIM support checking
119 # XXX These needs to be changed as more supported platforms appear.
120 # XXX This probably needs to be made platform dependant check.
123 AC_MSG_CHECKING(for SIM support)
125 AC_CHECK_HEADERS(dlfcn.h,
127 AC_CHECK_LIB(dl, dlopen,
129 AC_DEFINE([SILC_SIM], [], [HAVE_SIM])
134 AC_CHECK_LIB(c, dlopen,
136 AC_DEFINE([SILC_SIM], [], [HAVE_SIM])
142 AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue)
143 if test x$sim_support = xtrue; then
144 AC_MSG_RESULT(Enabled SIM support.)
145 __SILC_HAVE_SIM="#define __SILC_HAVE_SIM 1"
147 AC_MSG_RESULT(No SIM support found.)
151 # lib/contrib conditionals
153 AC_CHECK_HEADER(regex.h,
155 AC_DEFINE([HAVE_REGEX], [], [HAVE_REGEX])
159 AM_CONDITIONAL(HAVE_REGEX, test x$have_regex = x1)
161 AC_CHECK_FUNC(getopt_long,
163 AC_DEFINE([HAVE_GETOPT_LONG], [], [HAVE_GETOPT_LONG])
165 ], have_getopt_long=0
167 AM_CONDITIONAL(HAVE_GETOPT_LONG, test x$have_getopt_long = x1)
170 ## Enable/disable checking
173 #ifdef SILC_DIST_IPV6
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])
229 #endif SILC_DIST_IPV6
233 AC_MSG_CHECKING(whether to enable debugging)
235 __SILC_ENABLE_DEBUG=""
237 [ --enable-debug enable debugging],
239 case "${enableval}" in
242 AC_DEFINE([SILC_DEBUG], [], [enable-debug])
244 __SILC_ENABLE_DEBUG="#define __SILC_ENABLE_DEBUG 1"
256 # Disable all assembler optimizations
258 AC_MSG_CHECKING(whether to enable assembler optimizations)
261 [ --disable-asm do not use assembler optimizations],
273 ## Compiler and compiler flag checks
276 # Function to check if compiler flag works
277 # Usage: SILC_ADD_CFLAGS(FLAGS, [ACTION-IF-FAILED])
278 AC_DEFUN([SILC_ADD_CFLAGS],
279 [ tmp_CFLAGS="$CFLAGS"
281 AC_MSG_CHECKING(whether $CC accepts $1 flag)
282 AC_TRY_LINK([], [], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
289 # GCC specific options
290 if test "x$summary_debug" = "xyes"; then
291 SILC_ADD_CFLAGS(-g -O)
293 SILC_ADD_CFLAGS(-g -O2)
295 SILC_ADD_CFLAGS(-Wall -finline-functions)
300 SILC_ADD_CFLAGS(-g3 -O2, SILC_ADD_CFLAGS(-g3 -O, SILC_ADD_CFLAGS(-O)))
304 SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
308 # Intel C++ Compiler needs -restrict
309 if test "x$CC" = "xicc"; then
310 SILC_ADD_CFLAGS(-restrict)
315 # Workaround a bug in GCC 2.x which causes memory exhaustion
316 # when compiling sha1 with optimizations on UltraSPARC.
319 if test "$GCC" -a "$host_cpu" = "sparc64"; then
320 AC_MSG_CHECKING(whether to enable GCC 2.x workaround for SHA1)
323 #if defined(__sparc64__) && (__GNUC__ == 2)
342 # Default installation destination
344 AC_PREFIX_DEFAULT(/usr/local/silc)
345 if test "x$prefix" != xNONE; then
346 silc_prefix="$prefix"
348 silc_prefix="$ac_default_prefix"
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 HELPDIR="$silc_prefix/help"
377 [[ --with-helpdir=DIR directory for SILC help files [PREFIX/help]]],
388 AC_DEFINE_UNQUOTED([SILC_HELPDIR], "$HELPDIR", [SILC_HELPDIR])
392 DOCDIR="$silc_prefix/doc"
394 [[ --with-docdir=DIR directory for SILC documentation [PREFIX/doc]]],
405 AC_DEFINE_UNQUOTED([SILC_DOCDIR], "$DOCDIR", [SILC_DOCDIR])
408 # SIM modules directory
410 MODULESDIR="$silc_prefix/modules"
412 [[ --with-simdir=DIR directory for SIM modules [PREFIX/modules]]],
418 MODULESDIR="$withval"
423 AC_DEFINE_UNQUOTED([SILC_MODULESDIR], "$MODULESDIR", [SILC_MODULESDIR])
426 #ifdef SILC_DIST_SERVER
430 LOGSDIR="$silc_prefix/logs"
432 [[ --with-logsdir=DIR directory for SILC Server logs [PREFIX/logs]]],
443 AC_DEFINE_UNQUOTED([SILC_LOGSDIR], "$LOGSDIR", [SILC_LOGSDIR])
445 # silcd config file checking
447 summary_silcd_configfile="/etc/silc/silcd.conf"
448 AC_ARG_WITH(silcd-config-file,
449 [[ --with-silcd-config-file=FILE use FILE as default configuration file
450 for SILC Server [/etc/silc/silcd.conf]]],
451 AC_DEFINE_UNQUOTED([SILC_SERVER_CONFIG_FILE], "$withval", [SILC_SERVER_CONFIG_FILE])
452 summary_silcd_configfile="$withval"
455 # silcd pid file checking
457 if test "x$localstatedir" != 'x${prefix}/var'; then
458 PIDFILE="$localstatedir/silcd.pid"
460 PIDFILE="$silc_prefix/var/silcd.pid"
463 AC_ARG_WITH(silcd-pid-file,
464 [[ --with-silcd-pid-file=FILE use FILE as default pid file for SILC
465 Server [/var/run/silcd.pid]]],
476 #endif SILC_DIST_SERVER
479 ## With/without checkings
483 # SILC library checking
486 #ifndef SILC_DIST_TOOLKIT
488 AC_ARG_WITH(silc-includes,
489 [ --with-silc-includes=DIR SILC Toolkit includes [search in DIR]],
490 [ac_silc_includes="$withval"], [ac_silc_includes="no"])
491 AC_ARG_WITH(silc-libs,
492 [ --with-silc-libs=DIR SILC Toolkit libraries [search in DIR]],
493 [ac_silc_libs="$withval"], [ac_silc_libs="no"])
496 # XXX missing checking the __SILC_WITH_XXX defines from the provided libs
497 # in order to determine correct libs to link.
500 # XXX missing pkg-config check.
502 if test "$ac_silc_includes" != "no"; then
504 SILC_LIB_INCLUDES="-I$ac_silc_includes"
506 if test "$ac_silc_libs" != "no"; then
508 LIBS="$LIBS -L$ac_silc_libs"
511 #endif SILC_DIST_TOOLKIT
514 # SOCKS4 support checking
517 SAVE_CFLAGS="$CFLAGS"
518 SAVE_LDFLAGS="$LDFLAGS"
519 AC_MSG_CHECKING(whether to support SOCKS4)
521 [[ --with-socks4[=DIR] with SOCKS4 support [search in DIR/lib and DIR/include]]],
531 if test -d "$withval/include"; then
532 CFLAGS="$CFLAGS -I$withval/include"
534 if test -d "$withval/lib"; then
535 LDFLAGS="$LDFLAGS -L$withval/lib"
547 AC_MSG_ERROR(Could not find SOCKS4 library.)
549 CFLAGS="$SAVE_CFLAGS"
550 LDFLAGS="$SAVE_LDFLAGS"
556 # SOCKS5 support checking
559 SAVE_CFLAGS="$CFLAGS"
560 SAVE_LDFLAGS="$LDFLAGS"
561 AC_MSG_CHECKING(whether to support SOCKS5)
563 [[ --with-socks5[=DIR] with SOCKS5 support [search in DIR/lib and DIR/include]]],
573 if test -d "$withval/include"; then
574 CFLAGS="$CFLAGS -I$withval/include"
576 if test -d "$withval/lib"; then
577 LDFLAGS="$LDFLAGS -L$withval/lib"
580 LIBS="-lsocks5 $LIBS"
589 AC_MSG_ERROR(Could not find SOCKS5 library.)
591 CFLAGS="$SAVE_CFLAGS"
592 LDFLAGS="$SAVE_LDFLAGS"
598 if test "x$socks" = "x4"; then
599 AC_DEFINE([SOCKS], [], [Socks])
600 CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
603 if test "x$socks" = "x5"; then
604 AC_DEFINE([SOCKS], [], [Socks])
605 AC_DEFINE([SOCKS5], [], [Socks5])
606 AC_DEFINE([Rconnect], [SOCKSconnect], [Socks])
607 AC_DEFINE([Rgetsockname], [SOCKSgetsockname], [Socks])
608 AC_DEFINE([Rgetpeername], [SOCKSgetpeername], [Socks])
609 AC_DEFINE([Rbind], [SOCKSbind], [Socks])
610 AC_DEFINE([Raccept], [SOCKSaccept], [Socks])
611 AC_DEFINE([Rlisten], [SOCKSlisten], [Socks])
612 AC_DEFINE([Rselect], [SOCKSselect], [Socks])
613 AC_DEFINE([Rrecvfrom], [SOCKSrecvfrom], [Socks])
614 AC_DEFINE([Rsendto], [SOCKSsendto], [Socks])
615 AC_DEFINE([Rrecv], [SOCKSrecv], [Socks])
616 AC_DEFINE([Rsend], [SOCKSsend], [Socks])
617 AC_DEFINE([Rread], [SOCKSread], [Socks])
618 AC_DEFINE([Rwrite], [SOCKSwrite], [Socks])
619 AC_DEFINE([Rrresvport], [SOCKSrresvport], [Socks])
620 AC_DEFINE([Rshutdown], [SOCKSshutdown], [Socks])
621 AC_DEFINE([Rlisten], [SOCKSlisten], [Socks])
622 AC_DEFINE([Rclose], [SOCKSclose], [Socks])
623 AC_DEFINE([Rdup], [SOCKSdup], [Socks])
624 AC_DEFINE([Rdup2], [SOCKSdup2], [Socks])
625 AC_DEFINE([Rfclose], [SOCKSfclose], [Socks])
626 AC_DEFINE([Rgethostbyname], [SOCKSgethostbyname], [Socks])
629 #ifdef SILC_DIST_MATH
630 # MP library checking. First check whether user wants to use GMP and use
631 # it if found. If not or not defined then compile the MPI library in the
636 SAVE_CFLAGS="$CFLAGS"
637 SAVE_LDFLAGS="$LDFLAGS"
638 AC_MSG_CHECKING(whether to search for GMP)
640 [[ --with-gmp[=DIR] use GMP instead of MPI [search in DIR/lib and DIR/include]]],
649 if test -d "$withval/include"; then
650 CFLAGS="$CFLAGS -I$withval/include"
652 if test -d "$withval/lib"; then
653 LDFLAGS="$LDFLAGS -L$withval/lib"
660 AC_CHECK_LIB(gmp, __gmpz_init,
663 AC_DEFINE([SILC_MP_GMP], [], [GMP])
664 AC_MSG_RESULT(Using GMP as a MP library.)
668 CFLAGS="$SAVE_CFLAGS"
669 LDFLAGS="$SAVE_LDFLAGS"
675 AM_CONDITIONAL(SILC_MP_GMP, test x$mp_gmp = xtrue)
676 AM_CONDITIONAL(SILC_MP_NSS_MPI, test x$mp_gmp = xfalse)
677 if test x$mp_gmp = xfalse; then
678 AC_DEFINE([SILC_MP_NSS_MPI], [], [MPI])
679 AC_MSG_RESULT(Using NSS MPI as a MP library.)
681 #endif SILC_DIST_MATH
688 SAVE_CFLAGS="$CFLAGS"
689 SAVE_LDFLAGS="$LDFLAGS"
690 SAVE_CPPFLAGS="$CPPFLAGS"
691 AC_MSG_CHECKING(whether to implicit search for libiconv)
693 [[ --with-iconv[=DIR] use libiconv [search in DIR/include and DIR/lib]]],
698 AC_CHECK_HEADERS(iconv.h,
700 AC_CHECK_FUNC(iconv, has_iconv=true)
706 if test -d $withval/include; then
707 CPPFLAGS="$CPPFLAGS -I$withval/include"
708 CFLAGS="$CFLAGS -I$withval/include"
710 if test -d $withval/lib; then
711 LDFLAGS="$LDFLAGS -L$withval/lib"
718 AC_CHECK_HEADERS(iconv.h,
720 AC_CHECK_FUNCS(iconv,
728 if test x$check_iconv = xtrue; then
729 AC_MSG_RESULT(Searching for iconv...)
732 unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
734 AC_CHECK_HEADERS(iconv.h,
737 AC_MSG_CHECKING(for iconv in -liconv)
744 iconv_t cd = iconv_open("", "");
745 iconv(cd, NULL, NULL, NULL, NULL);
750 AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
757 CFLAGS="$SAVE_CFLAGS"
758 LDFLAGS="$SAVE_LDFLAGS"
759 CPPFLAGS="$SAVE_CPPFLAGS"
764 if test x$check_iconv = xtrue; then
765 # search for iconv library..
767 SAVE_CFLAGS="$CFLAGS"
768 SAVE_LDFLAGS="$LDFLAGS"
769 SAVE_CPPFLAGS="$CPPFLAGS"
771 for dir in `echo "/usr/local /usr/pkg /usr/contrib"`; do
772 if test x$has_iconv = xfalse; then
773 AC_MSG_RESULT(searching in $dir...)
775 if test -d $dir/include; then
776 CPPFLAGS="$CPPFLAGS -I$dir/include"
777 CFLAGS="$CFLAGS -I$dir/include"
779 if test -d $dir/lib; then
780 LDFLAGS="$LDFLAGS -L$dir/lib"
784 unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
786 AC_CHECK_HEADERS(iconv.h,
789 AC_MSG_CHECKING(for iconv in -liconv)
796 iconv_t cd = iconv_open("", "");
797 iconv(cd, NULL, NULL, NULL, NULL);
803 AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
810 CFLAGS="$SAVE_CFLAGS"
811 LDFLAGS="$SAVE_LDFLAGS"
812 CPPFLAGS="$SAVE_CPPFLAGS"
816 CFLAGS="$SAVE_CFLAGS"
817 LDFLAGS="$SAVE_LDFLAGS"
818 CPPFLAGS="$SAVE_CPPFLAGS"
824 if test x$has_iconv = xtrue; then
825 # (1) Some implementations of iconv won't convert from UTF-8 to UTF-8.
826 # (2) In glibc-2.1.2 and earlier there is a bug that messes up ob and
827 # obl when args 2 and 3 are 0 (fixed in glibc-2.1.3).
829 AC_CACHE_CHECK([whether this iconv is good enough], ac_iconv_good,
840 ob = buf, obl = sizeof(buf);
841 return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1) &&
842 (iconv(cd, 0, 0, &ob, &obl) ||
843 !(ob == buf && obl == sizeof(buf)) ||
858 if test x$ac_iconv_good = xno; then
859 AC_MSG_RESULT(Try using libiconv instead.)
864 #ifdef SILC_DIST_THREAD
865 # POSIX threads support
868 AC_MSG_CHECKING(whether to search for POSIX threads)
869 AC_ARG_WITH(pthreads,
870 [[ --with-pthreads[=DIR] use POSIX threads [search in DIR/include and DIR/lib]]],
877 if test -d $withval/include; then
878 CPPFLAGS="$CPPFLAGS -I$withval/include"
879 CFLAGS="$CFLAGS -I$withval/include"
881 if test -d $withval/lib; then
882 LDFLAGS="$LDFLAGS -L$withval/lib"
890 if test x$check_threads = xtrue; then
892 SAVE_CFLAGS="$CFLAGS"
893 SAVE_LDFLAGS="$LDFLAGS"
894 SAVE_CPPFLAGS="$CPPFLAGS"
897 AC_CHECK_HEADERS(pthread.h,
899 LIBS="$LIBS -lpthread"
900 AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
905 LIBS="$SAVE_LIBS -pthread"
906 AC_CHECK_LIB(c_r, pthread_attr_init, has_threads=true, LIBS="$SAVE_LIBS")
915 # search for pthread library..
916 for dir in `echo "/usr/local /usr/pkg /usr/contrib /usr/pkg/pthreads /usr/local/pthreads"`; do
917 if test x$has_threads = xfalse; then
918 AC_MSG_RESULT(searching in $dir...)
920 if test -d $dir/include; then
921 CPPFLAGS="$CPPFLAGS -I$dir/include"
922 CFLAGS="$CFLAGS -I$dir/include"
924 if test -d $dir/lib; then
925 LDFLAGS="$LDFLAGS -L$dir/lib"
929 unset ac_cv_header__pthread_h_ ac_cv_header_pthread_h || true
931 AC_CHECK_HEADERS(pthread.h,
933 LIBS="$LIBS -lpthread"
934 AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
939 CFLAGS="$SAVE_CFLAGS"
940 LDFLAGS="$SAVE_LDFLAGS"
941 CPPFLAGS="$SAVE_CPPFLAGS"
945 CFLAGS="$SAVE_CFLAGS"
946 LDFLAGS="$SAVE_LDFLAGS"
947 CPPFLAGS="$SAVE_CPPFLAGS"
957 __SILC_HAVE_PTHREAD=""
958 AM_CONDITIONAL(SILC_THREADS, test x$has_threads = xtrue)
959 if test x$has_threads = xtrue; then
960 CFLAGS="$CFLAGS -D_REENTRANT"
962 # XXX possibly incomplete
965 CFLAGS="$CFLAGS -D_THREAD_SAFE"
966 if test x"$GCC" = xyes; then
967 CFLAGS="$CFLAGS -mthreads"
971 CFLAGS="$CFLAGS -D_THREAD_SAFE"
973 *-*-sysv5uw7*) # UnixWare 7
974 if test "$GCC" != "yes"; then
975 CFLAGS="$CFLAGS -Kthread"
977 CFLAGS="$CFLAGS -pthread"
981 CFLAGS="$CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
985 AC_CHECK_FUNC(pthread_create)
986 AC_DEFINE([SILC_HAVE_PTHREAD], [], [HAVE_PTHREAD])
987 AC_DEFINE([SILC_THREADS], [], [HAVE_THREAD])
988 __SILC_HAVE_PTHREAD="#define __SILC_HAVE_PTHREAD 1"
990 #endif SILC_DIST_THREAD
993 # Native WIN32 compilation under cygwin
995 AC_MSG_CHECKING(whether to compile native WIN32 code)
997 [ --with-win32 compile native WIN32 (MinGW) code (-mno-cygwin)],
1000 AC_DEFINE([SILC_WIN32], [], [SILC_WIN32])
1002 CFLAGS="-mno-cygwin $CFLAGS"
1003 LIBS="$LIBS -lwsock32"
1008 AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
1010 # Native EPOC support (disabled by default)
1012 AM_CONDITIONAL(SILC_EPOC, test xfalse = xtrue)
1014 # Native BeOS support (disabled by default)
1016 AM_CONDITIONAL(SILC_BEOS, test xfalse = xtrue)
1018 # Native OS2 support (disabled by default)
1020 AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue)
1022 #ifdef SILC_DIST_TOOLKIT
1027 AC_MSG_CHECKING(whether to compile Irssi SILC Client)
1029 [ --without-irssi compile without Irssi SILC Client],
1041 AC_MSG_CHECKING(whether to compile SILC Server)
1043 [ --without-silcd compile without SILC Server],
1052 #endif SILC_DIST_TOOLKIT
1054 #ifdef SILC_DIST_CLIENT
1055 # Irssi perl support
1058 [[ --with-perl[=yes|no|module] Build with Perl support - also specifies
1059 if it should be built into main silc binary
1060 (static, default) or as a module]])
1061 #endif SILC_DIST_CLIENT
1064 AC_MSG_CHECKING(whether to do libtoolfix)
1065 AC_ARG_WITH(libtoolfix,
1066 [ --without-libtoolfix Do not fix libtool, for package builders],
1076 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
1082 # Other configure scripts
1085 #ifdef SILC_DIST_TOOLKIT
1086 if test x$without_irssi = xfalse; then
1087 #endif SILC_DIST_TOOLKIT
1088 #ifdef SILC_DIST_CLIENT
1089 AC_CONFIG_SUBDIRS(irssi)
1091 #endif SILC_DIST_CLIENT
1092 #ifdef SILC_DIST_TOOLKIT
1094 #endif SILC_DIST_TOOLKIT
1096 SILC_TOP_SRCDIR=`pwd`
1098 # Included configure scripts
1099 AD_INCLUDE_CONFIGURE
1104 AC_SUBST(SILC_TOP_SRCDIR)
1106 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
1107 AC_SUBST(INCLUDE_DEFINES_INT)
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)
1129 Makefile.defines_int
1131 doc/example_silcd.conf
1133 includes/silcversion.h
1134 includes/silcincludes.h
1137 #ifdef SILC_DIST_TOOLKIT
1138 if test x$without_irssi = xfalse ; then
1139 #endif SILC_DIST_TOOLKIT
1140 #ifdef SILC_DIST_CLIENT
1142 irssi/Makefile.defines
1143 irssi/Makefile.defines_int
1145 #endif SILC_DIST_CLIENT
1146 #ifdef SILC_DIST_TOOLKIT
1148 #endif SILC_DIST_TOOLKIT
1150 #ifdef SILC_DIST_TOOLKIT
1151 if test x$without_silcd = xfalse ; then
1152 #endif SILC_DIST_TOOLKIT
1153 #ifdef SILC_DIST_SERVER
1154 AC_CONFIG_FILES(silcd/Makefile)
1155 #endif SILC_DIST_SERVER
1156 #ifdef SILC_DIST_TOOLKIT
1158 #endif SILC_DIST_TOOLKIT
1160 #ifdef SILC_DIST_TOOLKIT
1164 win32/libsilc/Makefile
1165 win32/libsilcclient/Makefile
1167 tutorial/Makefile.defines
1168 tutorial/Makefile.defines_int
1170 #endif SILC_DIST_TOOLKIT
1174 s_bindir=`eval echo $bindir`;s_bindir=`eval echo $s_bindir`
1175 s_sbindir=`eval echo $sbindir`;s_sbindir=`eval echo $s_sbindir`
1176 s_mandir=`eval echo $mandir`;s_mandir=`eval echo $s_mandir`
1177 s_includedir=`eval echo $includedir`;s_includedir=`eval echo $s_includedir`
1180 echo "$PACKAGE Configuration Summary:"
1181 echo "---------------------------"
1182 echo " Target host ...................: $target"
1183 echo " Compiler ......................: $CC"
1184 echo " CFLAGS ........................: $CFLAGS"
1185 echo " CPPFLAGS ......................: $CPPFLAGS"
1186 echo " LDFLAGS .......................: $LDFLAGS"
1187 echo " LIBS ..........................: $LIBS"
1189 echo " Installation prefix ...........: $prefix"
1190 echo " bin directory .................: $s_bindir"
1191 echo " sbin directory ................: $s_sbindir"
1192 echo " etc directory .................: $ETCDIR"
1193 echo " man directory .................: $s_mandir"
1194 echo " help directory ................: $HELPDIR"
1195 echo " doc directory .................: $DOCDIR"
1196 #ifdef SILC_DIST_SERVER
1197 echo " logs directory ................: $LOGSDIR"
1198 #endif SILC_DIST_SERVER
1199 #ifdef SILC_DIST_SIM
1200 echo " SIM directory .................: $MODULESDIR"
1201 #endif SILC_DIST_SIM
1202 #ifdef SILC_DIST_INCLUDES
1203 echo " include directory .............: $s_includedir"
1204 #endif SILC_DIST_INCLUDES
1207 #ifdef SILC_DIST_SERVER
1209 #endif SILC_DIST_SERVER
1211 #ifdef SILC_DIST_TOOLKIT
1212 if test x$without_irssi = xtrue; then
1215 if test x$without_silcd = xtrue; then
1218 #endif SILC_DIST_TOOLKIT
1220 #ifdef SILC_DIST_CLIENT
1221 echo " Compile SILC Client ...........: $irssi"
1222 #endif SILC_DIST_CLIENT
1224 #ifdef SILC_DIST_SERVER
1225 echo " Compile SILC Server ...........: $silcd"
1226 echo " Server configuration file .....: $summary_silcd_configfile"
1227 echo " Server PID file ...............: $PIDFILE"
1228 #endif SILC_DIST_SERVER
1230 #ifdef SILC_DIST_SIM
1231 if test x$sim_support = xfalse; then
1236 echo " SIM support ...................: $sim_support"
1237 #endif SILC_DIST_SIM
1239 #ifdef SILC_DIST_IPV6
1240 echo " IPv6 support ..................: $summary_ipv6"
1241 #endif SILC_DIST_IPV6
1243 if test x$has_iconv = xfalse; then
1248 echo " Iconv support .................: $iconv_support"
1250 #ifdef SILC_DIST_ASM
1251 if test x$want_asm = xfalse; then
1256 echo " Assembler optimizations .......: $summary_asm"
1257 #endif SILC_DIST_ASM
1259 #ifdef SILC_DIST_MATH
1261 if test x$mp_gmp = xtrue; then
1264 echo " Arithmetic library ............: $mp"
1265 #endif SILC_DIST_MATH
1267 #ifdef SILC_DIST_THREAD
1269 if test x$has_threads = xtrue; then
1272 echo " Multi-threads support .........: $threads"
1273 #endif SILC_DIST_THREAD
1274 echo " Debugging enabled .............: $summary_debug"
1276 echo "Compile the sources with 'make' or 'gmake' command."