Made lib/contrib stuff compilation conditional.
[silc.git] / configure.in.pre
1 #
2 #  configure.in.pre
3 #
4 #  Author: Pekka Riikonen <priikone@silcnet.org>
5 #
6 #  Copyright (C) 2000 - 2002 Pekka Riikonen
7 #
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; either version 2 of the License, or
11 #  (at your option) any later version.
12 #
13 #  This program is distributed in the hope that it will be useful,
14 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #  GNU General Public License for more details.
17 #
18
19 AC_INIT(includes/silcversion.h)
20
21 #
22 # Put here any platform specific stuff
23 #
24 AC_CANONICAL_SYSTEM
25 case "$target" in
26   *-*-*bsd*)
27     check_threads=false
28     ;;
29   *)
30     check_threads=true
31     ;;
32 esac
33
34 # ./prepare script will automatically put the correct version. Do not edit!
35 AM_INIT_AUTOMAKE(SILC_PACKAGE, SILC_VERSION)
36 AC_PREREQ(2.52)
37 AM_CONFIG_HEADER(includes/silcdefs.h)
38
39 AC_PROG_CC
40 AC_C_INLINE
41 AC_C_CONST
42
43 AC_PROG_LN_S
44 AC_SUBST(LN_S)
45
46 # Distribution definition. ./prepare will automatically add here a correct
47 # value. Do not edit!
48 silc_dist=SILC_PACKAGE
49 SILC_DIST_SUBDIRS="SILC_DISTRIBUTION_SUBDIRS"
50 AC_DEFINE(SILC_DIST_DEFINE)
51
52 # XXX
53 # Compiler flags
54 if test "$GCC"; then
55   CFLAGS="-Wall -finline-functions $CFLAGS"
56 fi
57
58 # Program checking
59 AC_PROG_INSTALL
60 AC_PROG_RANLIB
61 AC_PROG_MAKE_SET
62 AC_PROG_LIBTOOL
63 AC_PATH_PROG(sedpath, sed)
64
65 # Header checking
66 AC_HEADER_STDC
67 AC_HEADER_TIME
68 AC_HEADER_STAT
69
70 # 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)
74 AC_CHECK_HEADERS(pwd.h grp.h termcap.h paths.h)
75 AC_CHECK_HEADERS(ncurses.h signal.h ctype.h utime.h iconv.h)
76 AC_CHECK_HEADERS(arpa/inet.h sys/mman.h limits.h termios.h locale.h langinfo.h)
77
78 # Data type checking
79 AC_TYPE_SIGNAL
80 AC_TYPE_SIZE_T
81 AC_TYPE_MODE_T
82 AC_TYPE_UID_T
83 AC_TYPE_PID_T
84
85 AC_CHECK_SIZEOF(long long, 0)
86 AC_DEFINE_UNQUOTED(SILC_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long)
87 AC_CHECK_SIZEOF(long, 0)
88 AC_DEFINE_UNQUOTED(SILC_SIZEOF_LONG, $ac_cv_sizeof_long)
89 AC_CHECK_SIZEOF(int, 0)
90 AC_DEFINE_UNQUOTED(SILC_SIZEOF_INT, $ac_cv_sizeof_int)
91 AC_CHECK_SIZEOF(short, 0)
92 AC_DEFINE_UNQUOTED(SILC_SIZEOF_SHORT, $ac_cv_sizeof_short)
93 AC_CHECK_SIZEOF(char, 0)
94 AC_DEFINE_UNQUOTED(SILC_SIZEOF_CHAR, $ac_cv_sizeof_char)
95 AC_CHECK_SIZEOF(void *, 0)
96 AC_DEFINE_UNQUOTED(SILC_SIZEOF_VOID_P, $ac_cv_sizeof_void_p)
97
98 # Function and library checking
99 AC_CHECK_FUNC(gethostbyname, ac_gethostbyname_found=1,ac_gethostbyname_found=0)
100 if test x$ac_gethostbyname_found = x0; then
101     AC_CHECK_LIB(nsl, gethostbyname, LIBS="$LIBS -lnsl")
102     AC_CHECK_FUNC(res_gethostbyname, ac_res_ghbn_found=1, ac_res_ghbn_found=0)
103     if test x$ac_res_ghbn_found = x0; then
104         AC_CHECK_LIB(resolv, res_gethostbyname,  LIBS="$LIBS -lresolv")
105     fi
106 fi
107 AC_CHECK_FUNC(socket, ac_socket_found=1, ac_socket_found=0)
108 if test x$ac_socket_found = x0; then
109     AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
110 fi
111 AC_CHECK_FUNCS(gethostname gethostbyaddr getservbyname getservbyport)
112 AC_CHECK_FUNCS(select listen bind shutdown close connect)
113 AC_CHECK_FUNCS(fcntl setsockopt time)
114 AC_CHECK_FUNCS(chmod stat fstat getenv putenv strerror ctime gettimeofday)
115 AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid)
116 AC_CHECK_FUNCS(setgroups initgroups)
117 AC_CHECK_FUNCS(strchr strstr strcpy strncpy memcpy memset memmove utime iconv)
118 AC_CHECK_FUNCS(pthread_create nl_langinfo)
119
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.
123 sim_support=false
124 AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue)
125 AC_CHECKING(for SIM support)
126 AC_CHECK_HEADERS(dlfcn.h, 
127   AC_CHECK_LIB(dl, dlopen, 
128     AC_DEFINE(SILC_SIM) 
129     sim_support=true
130     AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue)
131     AC_MSG_RESULT(enabled SIM support)
132     LIBS="$LIBS -ldl",
133     AC_MSG_RESULT(no SIM support found)),
134   AC_MSG_RESULT(no SIM support found))
135
136 #
137 # lib/contrib conditionals
138 #
139 AC_CHECK_HEADER(regex.h, have_regex=1, have_regex=0)
140 AM_CONDITIONAL(HAVE_REGEX, test x$have_regex = x1)
141 AC_CHECK_FUNC(getopt_long, have_getopt_long=1, have_getopt_long=0)
142 AM_CONDITIONAL(HAVE_GETOPT_LONG, test x$have_getopt_long = x1)
143
144 #
145 # Installation
146 #
147
148 # Default installation destination
149 AC_PREFIX_DEFAULT(/usr/local/silc)
150
151 if test "x$prefix" != xNONE; then
152         silc_prefix="$prefix"
153 else
154         silc_prefix="$ac_default_prefix"
155 fi
156
157 # etc directory
158 if test "x$sysconfdir" != 'x${prefix}/etc'; then
159         ETCDIR="$sysconfdir"
160 else
161         ETCDIR="$silc_prefix/etc"
162 fi
163 AC_ARG_WITH(etcdir,
164 [  --with-etcdir[=PATH]      Directory for system files [/etc/silc]],
165 [ case "$withval" in
166   no)
167     ;;
168   yes)
169     ETCDIR="$withval"
170     ;;
171   *)
172     ETCDIR="$withval"
173     ;;
174   esac ],
175 )
176 AC_SUBST(ETCDIR)
177 AC_DEFINE_UNQUOTED(SILC_ETCDIR, "$ETCDIR")
178
179 # help directory
180 HELPDIR="$silc_prefix/help"
181 AC_ARG_WITH(helpdir,
182 [  --with-helpdir[=PATH]     Directory for SILC help files [PREFIX/help]],
183 [ case "$withval" in
184   no)
185     ;;
186   yes)
187     HELPDIR="$withval"
188     ;;
189   *)
190     HELPDIR="$withval"
191     ;;
192   esac ],
193 )
194 AC_SUBST(HELPDIR)
195 AC_DEFINE_UNQUOTED(SILC_HELPDIR, "$HELPDIR")
196
197 # doc directory
198 DOCDIR="$silc_prefix/doc"
199 AC_ARG_WITH(docdir,
200 [  --with-docdir[=PATH]      Directory for SILC documentation [PREFIX/doc]],
201 [ case "$withval" in
202   no)
203     ;;
204   yes)
205     DOCDIR="$withval"
206     ;;
207   *)
208     DOCDIR="$withval"
209     ;;
210   esac ],
211 )
212 AC_SUBST(DOCDIR)
213 AC_DEFINE_UNQUOTED(SILC_DOCDIR, "$DOCDIR")
214
215 # SIM modules directory
216 MODULESDIR="$silc_prefix/modules"
217 AC_ARG_WITH(simdir,
218 [  --with-simdir[=PATH]      Directory for SIM modules [PREFIX/modules]],
219 [ case "$withval" in
220   no)
221     ;;
222   yes)
223     MODULESDIR="$withval"
224     ;;
225   *)
226     MODULESDIR="$withval"
227     ;;
228   esac ],
229 )
230 AC_SUBST(MODULESDIR)
231 AC_DEFINE_UNQUOTED(SILC_MODULESDIR, "$MODULESDIR")
232
233 # Logs directory
234 LOGSDIR="$silc_prefix/logs"
235 AC_ARG_WITH(logsdir,
236 [  --with-logsdir[=PATH]     Directory for Server logs [PREFIX/logs]],
237 [ case "$withval" in
238   no)
239     ;;
240   yes)
241     LOGSDIR="$withval"
242     ;;
243   *)
244     LOGSDIR="$withval"
245     ;;
246   esac ],
247 )
248 AC_SUBST(LOGSDIR)
249 AC_DEFINE_UNQUOTED(SILC_LOGSDIR, "$LOGSDIR")
250
251 # SOCKS4 support checking
252 AC_MSG_CHECKING(whether to support SOCKS4)
253 AC_ARG_WITH(socks4,
254 [  --with-socks4[=PATH]      Compile with SOCKS4 support],
255 [ case "$withval" in
256   no)
257     AC_MSG_RESULT(no)
258     ;;
259   *)
260     AC_MSG_RESULT(yes)
261     socks=4
262
263     if test -d "$withval/include"; then
264       CFLAGS="$CFLAGS -I$withval/include"
265     else
266       CFLAGS="$CFLAGS -I$withval"
267     fi
268     if test -d "$withval/lib"; then
269       withval="-L$withval/lib -lsocks"
270     else
271       withval="-L$withval -lsocks"
272     fi
273
274     LIBS="$withval $LIBS"
275
276     AC_TRY_LINK([],
277                 [ Rconnect(); ],
278                 [],
279                 [ AC_MSG_ERROR(Could not find SOCKS4 library.)])
280       ;;
281   esac ],
282   AC_MSG_RESULT(no)
283 )   
284
285 # SOCKS5 support checking
286 AC_MSG_CHECKING(whether to support SOCKS5)
287 AC_ARG_WITH(socks5,
288 [  --with-socks5[=PATH]      Compile with SOCKS5 support],
289 [ case "$withval" in
290   no)
291     AC_MSG_RESULT(no)
292     ;;
293   *)
294     AC_MSG_RESULT(yes)
295     socks=5
296
297     if test -d "$withval/include"; then
298       CFLAGS="$CFLAGS -I$withval/include"
299     else
300       CFLAGS="$CFLAGS -I$withval"
301     fi
302     if test -d "$withval/lib"; then
303       withval="-L$withval/lib -lsocks5"
304     else
305       withval="-L$withval -lsocks5"
306     fi 
307
308     LIBS="$withval $LIBS"
309
310     AC_TRY_LINK([],
311                 [ SOCKSconnect(); ],
312                 [],
313                 [ AC_MSG_ERROR(Could not find SOCKS5 library.)])
314       ;;
315   esac ],
316   AC_MSG_RESULT(no)
317 )   
318
319 if test "x$socks" = "x4"; then
320   AC_DEFINE(SOCKS)
321   CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
322 fi
323
324 if test "x$socks" = "x5"; then
325   AC_DEFINE(SOCKS)
326   AC_DEFINE(SOCKS5)
327   AC_DEFINE(Rconnect, SOCKSconnect)
328   AC_DEFINE(Rgetsockname, SOCKSgetsockname)
329   AC_DEFINE(Rgetpeername, SOCKSgetpeername)
330   AC_DEFINE(Rbind, SOCKSbind)
331   AC_DEFINE(Raccept, SOCKSaccept)
332   AC_DEFINE(Rlisten, SOCKSlisten)
333   AC_DEFINE(Rselect, SOCKSselect)
334   AC_DEFINE(Rrecvfrom, SOCKSrecvfrom)
335   AC_DEFINE(Rsendto, SOCKSsendto)
336   AC_DEFINE(Rrecv, SOCKSrecv)
337   AC_DEFINE(Rsend, SOCKSsend)
338   AC_DEFINE(Rread, SOCKSread)
339   AC_DEFINE(Rwrite, SOCKSwrite)
340   AC_DEFINE(Rrresvport, SOCKSrresvport)
341   AC_DEFINE(Rshutdown, SOCKSshutdown)
342   AC_DEFINE(Rlisten, SOCKSlisten)
343   AC_DEFINE(Rclose, SOCKSclose)
344   AC_DEFINE(Rdup, SOCKSdup)
345   AC_DEFINE(Rdup2, SOCKSdup2)
346   AC_DEFINE(Rfclose, SOCKSfclose)
347   AC_DEFINE(Rgethostbyname, SOCKSgethostbyname)
348 fi
349
350 #
351 # MP library checking. First check whether user wants to use GMP and use
352 # it if found. If not or not defined then compile the MPI library in the
353 # source tree.
354 #
355 AC_MSG_CHECKING(whether to support GMP)
356 AC_ARG_WITH(gmp,
357 [  --with-gmp[=PATH]         Compile with GMP support instead of MPI],
358 [ case "$withval" in
359   no)
360     AC_MSG_RESULT(no)
361     mp_gmp=false
362     ;;
363   *)
364     AC_MSG_RESULT(yes)
365
366     if test -d "$withval/include"; then
367       CFLAGS="$CFLAGS -I$withval/include"
368     else
369       CFLAGS="$CFLAGS -I$withval"
370     fi
371     if test -d "$withval/lib"; then
372       withval="-L$withval/lib -lgmp"
373     else
374       withval="-L$withval -lgmp"
375     fi
376
377     LIBS="$withval $LIBS"
378     mp_gmp=false
379     AC_CHECK_LIB(gmp, __gmpz_init,
380       mp_gmp=true
381       AC_DEFINE(SILC_MP_GMP)
382       AC_MSG_RESULT(Using GMP as MP library)
383     )
384       ;;
385   esac ],
386   AC_MSG_RESULT(no)
387   mp_gmp=false
388 )
389
390 AM_CONDITIONAL(SILC_MP_GMP, test x$mp_gmp = xtrue)
391 AM_CONDITIONAL(SILC_MP_NSS_MPI, test x$mp_gmp = xfalse)
392 if test x$mp_gmp = xfalse; then
393   AC_DEFINE(SILC_MP_NSS_MPI)
394   AC_MSG_RESULT(Using NSS MPI as MP library)
395 fi
396
397 AC_ARG_WITH(silcd-config-file,
398 [  --with-silcd-config-file[=PATH]
399                           Use PATH as default configuration file in SILC
400                           server [/etc/silc/silcd.conf]],
401 [ AC_DEFINE_UNQUOTED(SILC_SERVER_CONFIG_FILE, "$withval") ])
402
403 if test "x$localstatedir" != 'x${prefix}/var'; then
404         PIDFILE="$localstatedir/silcd.pid"
405 else
406         PIDFILE="$silc_prefix/var/silcd.pid"
407 fi
408 AC_ARG_WITH(silcd-pid-file,
409 [  --with-silcd-pid-file[=PATH]
410                           Use PATH as default pid file in SILC
411                           server [/var/run/silcd.pid]],
412 [ case "$withval" in
413         no)
414                 ;;
415         yes)
416                 PIDFILE="$withval"
417                 ;;
418         *)
419                 PIDFILE="$withval"
420                 ;;
421         esac ],
422 )
423 AC_SUBST(PIDFILE)
424
425 #
426 # Native WIN32 compilation under cygwin
427 #
428 AC_ARG_WITH(win32,
429 [  --with-win32            Compile native WIN32 code (-mno-cygwin)],
430 [ AC_DEFINE(SILC_WIN32)
431   win32_support=true
432   CFLAGS="-mno-cygwin $CFLAGS" 
433   LIBS="$LIBS -lwsock32" ])
434
435 AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
436
437 #
438 # Native EPOC support (disabled by default)
439 #
440 AM_CONDITIONAL(SILC_EPOC, test xfalse = xtrue)
441
442 #
443 # Native BeOS support (disabled by default)
444 #
445 AM_CONDITIONAL(SILC_BEOS, test xfalse = xtrue)
446
447 #
448 # Native OS2 support (disabled by default)
449 #
450 AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue)
451
452 #
453 # --without-irssi
454 #
455 without_irssi=false
456 AC_ARG_WITH(irssi,
457 [  --without-irssi         Compile without Irssi SILC Client],
458 [ without_irssi=true 
459   SILC_DIST_SUBDIRS=`echo $SILC_DIST_SUBDIRS | $sedpath -e 's/irssi//'`
460 ])
461
462 #
463 # --without-silcd
464 #
465 without_silcd=false
466 AC_ARG_WITH(silcd,
467 [  --without-silcd         Compile without SILC Server],
468 [ without_silcd=true
469   SILC_DIST_SUBDIRS=`echo $SILC_DIST_SUBDIRS | $sedpath -e 's/silcd//'`
470 ])
471
472 #
473 # IPv6 support
474 #
475 AC_MSG_CHECKING(for IPv6 support)
476 AC_ARG_ENABLE(ipv6,
477 [  --enable-ipv6           Enable IPv6 support],
478 [ case "${enableval}" in
479   yes) 
480     want_ipv6=true
481     check_ipv6=false
482     AC_DEFINE(HAVE_IPV6)
483     AC_MSG_RESULT(yes)
484     ;;
485   *)
486     want_ipv6=false
487     check_ipv6=false
488     AC_MSG_RESULT(no)
489     ;;
490 esac ], check_ipv6=true)
491
492 if test x$check_ipv6 = xtrue; then
493   AC_TRY_COMPILE([#ifdef HAVE_NETINET_TCP_H
494                   #include <netinet/tcp.h>
495                   #endif
496                   #ifdef HAVE_NETDB_H
497                   #include <netdb.h>
498                   #endif
499                   #include <sys/socket.h>
500                   #ifdef HAVE_NETDB_IN_H
501                   #include <netinet/in.h>
502                   #endif],
503                   [struct sockaddr_in6 sin6;
504                    int family = AF_INET6;
505                   ], [AC_DEFINE(HAVE_IPV6)
506                       AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])
507 fi
508
509 #
510 # Debug checking
511 #
512 AC_MSG_CHECKING(for enabled debugging)
513 AC_ARG_ENABLE(debug,
514 [  --enable-debug          Enable debugging],
515 [ case "${enableval}" in
516   yes) 
517     AC_MSG_RESULT(yes)
518     AC_DEFINE(SILC_DEBUG)
519     CFLAGS="-O -g $CFLAGS"
520     ;;
521   *)
522     AC_MSG_RESULT(no)
523     CFLAGS="-O2 -g $CFLAGS"
524     ;;
525 esac ], CFLAGS="-O2 -g $CFLAGS"
526         AC_MSG_RESULT(no))
527
528 AC_MSG_CHECKING(for enabled stack tracing)
529 AC_ARG_ENABLE(stack-trace,
530 [  --enable-stack-trace    Enable memory stack trace],
531 [ case "${enableval}" in
532   yes) 
533     AC_MSG_RESULT(yes)
534     AC_DEFINE(SILC_STACKTRACE)
535     ;;
536   *)
537     AC_MSG_RESULT(no)
538     ;;
539 esac ], AC_MSG_RESULT(no))
540
541 #
542 # Disable all assembler optimizations
543 #
544 AC_ARG_ENABLE(asm,
545 [  --disable-asm           Do not use assembler optimizations ],
546 [])
547
548 #
549 # Threads support
550 #
551 AC_ARG_ENABLE(threads,
552 [  --disable-threads       Do not compile with multi-thread support],
553 [ case "${enableval}" in
554   yes)
555     want_threads=true
556     check_threads=true
557     ;;
558   *)
559     want_threads=false
560     check_threads=false
561     ;;
562 esac ])
563
564 if test x$check_threads = xtrue; then
565 want_threads=false
566 AC_CHECK_HEADERS(pthread.h, 
567         [ AC_DEFINE(SILC_HAVE_PTHREAD) 
568           want_threads=true ],
569         [ if test -f /usr/pkg/include/pthread.h ; then
570             AC_DEFINE(SILC_HAVE_PTHREAD)
571             AC_MSG_RESULT(Found pthread.h in /usr/pkg/include/)
572             CFLAGS="$CFLAGS -I/usr/pkg/include"
573             want_threads=true
574           elif test -f /usr/contrib/include/pthread.h ; then
575             AC_DEFINE(SILC_HAVE_PTHREAD)
576             AC_MSG_RESULT(Found pthread.h in /usr/contrib/include/)
577             CFLAGS="$CFLAGS -I/usr/contrib/include"
578             want_threads=true
579           fi
580         ])
581
582 AM_CONDITIONAL(SILC_THREADS, test x$want_threads = xtrue)
583 if test x$want_threads = xtrue; then
584   TMP_LIBS="$LIBS"
585   LIBS="-lpthread"
586   AC_TRY_LINK([#include <pthread.h>],
587               [pthread_attr_t attr; pthread_attr_init(&attr);], 
588   AC_DEFINE(SILC_THREADS),
589   LIBS="-L/usr/pkg/lib -lpthread"
590   AC_TRY_LINK([#include <pthread.h>],
591               [pthread_attr_t attr; pthread_attr_init(&attr);],
592   AC_DEFINE(SILC_THREADS),
593   LIBS="-L/usr/contrib/lib -lpthread"
594   AC_TRY_LINK([#include <pthread.h>],
595               [pthread_attr_t attr; pthread_attr_init(&attr);], 
596   AC_DEFINE(SILC_THREADS),
597   LIBS=""
598   )))
599
600   CFLAGS="$CFLAGS -D_REENTRANT"
601   case $host in
602     *-aix*)
603       CFLAGS="$CFLAGS -D_THREAD_SAFE"
604       if test x"$GCC" = xyes; then
605         CFLAGS="$CFLAGS -mthreads"  
606       fi
607       ;;
608     *-freebsd2.2*)
609       CFLAGS="$CFLAGS -D_THREAD_SAFE"
610       ;;
611     *-sysv5uw7*)  # UnixWare 7
612       if test "$GCC" != "yes"; then
613         CFLAGS="$CFLAGS -Kthread"
614       else
615         CFLAGS="$CFLAGS -pthread"
616       fi
617       ;;
618     *-dg-dgux*)  # DG/UX
619       CFLAGS="$CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
620       ;;
621     esac
622
623   LIBS="$TMP_LIBS $LIBS"
624 fi
625 fi
626
627 #
628 # Other configure scripts
629 #
630 if test x$without_irssi = xfalse; then
631   if test "x$silc_dist" = "xsilc-client" || 
632      test "x$silc_dist" = "xsilc-toolkit"; then
633   AC_CONFIG_SUBDIRS(irssi)
634   fi
635 fi
636
637 AC_CONFIG_SUBDIRS(lib/silcmath/mpi)
638 #AC_CONFIG_SUBDIRS(lib/zlib)
639
640 SILC_TOP_SRCDIR=`pwd`
641 AC_SUBST(SILC_TOP_SRCDIR)
642 #SILC_INSTALL_PREFIX=$ac_default_prefix
643 #AC_SUBST(SILC_INSTALL_PREFIX)
644 AC_SUBST(LIBS)
645 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
646 AC_SUBST(INCLUDE_DEFINES_INT)
647 AC_SUBST(SILC_DIST_SUBDIRS)
648
649 #
650 # Makefile outputs
651 #
652 AC_CONFIG_FILES( \
653 Makefile
654 Makefile.defines
655 Makefile.defines_int
656 doc/Makefile  
657 includes/Makefile
658 lib/Makefile
659 lib/contrib/Makefile
660 lib/silccore/Makefile
661 lib/silccrypt/Makefile 
662 lib/silcmath/Makefile
663 lib/silcmath/mpi/Makefile.defines
664 lib/silcmath/mpi/Makefile.defines_int
665 lib/silcsim/Makefile
666 lib/silcske/Makefile
667 lib/silcutil/Makefile
668 lib/silcutil/unix/Makefile
669 lib/silcutil/win32/Makefile
670 lib/silcutil/beos/Makefile
671 lib/silcutil/os2/Makefile
672 lib/silcutil/epoc/Makefile
673 lib/silcsftp/Makefile
674 lib/silcsftp/tests/Makefile
675 doc/example_silcd.conf
676 )
677
678 if test "x$silc_dist" = "xsilc-client" || 
679    test "x$silc_dist" = "xsilc-toolkit"; then
680 AC_CONFIG_FILES(lib/silcclient/Makefile)
681 fi
682
683 if test x$without_irssi = xfalse ; then
684 if test "x$silc_dist" = "xsilc-client" || 
685    test "x$silc_dist" = "xsilc-toolkit"; then
686 AC_CONFIG_FILES( \
687 irssi/Makefile.defines
688 irssi/Makefile.defines_int
689 )
690 fi
691 fi
692
693 if test x$without_silcd = xfalse ; then
694 if test "x$silc_dist" = "xsilc-server" ||
695    test "x$silc_dist" = "xsilc-toolkit"; then
696 AC_CONFIG_FILES( \
697 silcd/Makefile
698 )
699 fi
700 fi
701
702 if test "x$silc_dist" = "xsilc-toolkit"; then
703 AC_CONFIG_FILES( \
704 silc/Makefile
705 win32/Makefile
706 win32/libsilc/Makefile
707 win32/libsilcclient/Makefile
708 )
709 fi
710
711 AC_OUTPUT