search for ldopen in -lc, this enables SIM support on *BSD systems.
[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 AC_CHECKING(for SIM support)
125 AC_CHECK_HEADERS(dlfcn.h,
126   AC_CHECK_LIB(dl, dlopen,
127     AC_DEFINE(SILC_SIM)
128     sim_support=true
129     LIBS="$LIBS -ldl",
130  [AC_CHECK_LIB(c, dlopen,
131     AC_DEFINE(SILC_SIM)
132     sim_support=true
133   ]))
134 )
135
136 AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue)
137 if test x$sim_support = xtrue; then
138   AC_MSG_RESULT(enabled SIM support)
139 else
140   AC_MSG_RESULT(no SIM support found)
141 fi
142
143
144 #
145 # lib/contrib conditionals
146 #
147 AC_CHECK_HEADER(regex.h, have_regex=1, have_regex=0)
148 AM_CONDITIONAL(HAVE_REGEX, test x$have_regex = x1)
149 AC_CHECK_FUNC(getopt_long, have_getopt_long=1, have_getopt_long=0)
150 AM_CONDITIONAL(HAVE_GETOPT_LONG, test x$have_getopt_long = x1)
151
152 #
153 # Installation
154 #
155
156 # Default installation destination
157 AC_PREFIX_DEFAULT(/usr/local/silc)
158
159 if test "x$prefix" != xNONE; then
160         silc_prefix="$prefix"
161 else
162         silc_prefix="$ac_default_prefix"
163 fi
164
165 # etc directory
166 if test "x$sysconfdir" != 'x${prefix}/etc'; then
167         ETCDIR="$sysconfdir"
168 else
169         ETCDIR="$silc_prefix/etc"
170 fi
171 AC_ARG_WITH(etcdir,
172 [  --with-etcdir[=PATH]      Directory for system files [/etc/silc]],
173 [ case "$withval" in
174   no)
175     ;;
176   yes)
177     ETCDIR="$withval"
178     ;;
179   *)
180     ETCDIR="$withval"
181     ;;
182   esac ],
183 )
184 AC_SUBST(ETCDIR)
185 AC_DEFINE_UNQUOTED(SILC_ETCDIR, "$ETCDIR")
186
187 # help directory
188 HELPDIR="$silc_prefix/help"
189 AC_ARG_WITH(helpdir,
190 [  --with-helpdir[=PATH]     Directory for SILC help files [PREFIX/help]],
191 [ case "$withval" in
192   no)
193     ;;
194   yes)
195     HELPDIR="$withval"
196     ;;
197   *)
198     HELPDIR="$withval"
199     ;;
200   esac ],
201 )
202 AC_SUBST(HELPDIR)
203 AC_DEFINE_UNQUOTED(SILC_HELPDIR, "$HELPDIR")
204
205 # doc directory
206 DOCDIR="$silc_prefix/doc"
207 AC_ARG_WITH(docdir,
208 [  --with-docdir[=PATH]      Directory for SILC documentation [PREFIX/doc]],
209 [ case "$withval" in
210   no)
211     ;;
212   yes)
213     DOCDIR="$withval"
214     ;;
215   *)
216     DOCDIR="$withval"
217     ;;
218   esac ],
219 )
220 AC_SUBST(DOCDIR)
221 AC_DEFINE_UNQUOTED(SILC_DOCDIR, "$DOCDIR")
222
223 # SIM modules directory
224 MODULESDIR="$silc_prefix/modules"
225 AC_ARG_WITH(simdir,
226 [  --with-simdir[=PATH]      Directory for SIM modules [PREFIX/modules]],
227 [ case "$withval" in
228   no)
229     ;;
230   yes)
231     MODULESDIR="$withval"
232     ;;
233   *)
234     MODULESDIR="$withval"
235     ;;
236   esac ],
237 )
238 AC_SUBST(MODULESDIR)
239 AC_DEFINE_UNQUOTED(SILC_MODULESDIR, "$MODULESDIR")
240
241 # Logs directory
242 LOGSDIR="$silc_prefix/logs"
243 AC_ARG_WITH(logsdir,
244 [  --with-logsdir[=PATH]     Directory for Server logs [PREFIX/logs]],
245 [ case "$withval" in
246   no)
247     ;;
248   yes)
249     LOGSDIR="$withval"
250     ;;
251   *)
252     LOGSDIR="$withval"
253     ;;
254   esac ],
255 )
256 AC_SUBST(LOGSDIR)
257 AC_DEFINE_UNQUOTED(SILC_LOGSDIR, "$LOGSDIR")
258
259 # SOCKS4 support checking
260 AC_MSG_CHECKING(whether to support SOCKS4)
261 AC_ARG_WITH(socks4,
262 [  --with-socks4[=PATH]      Compile with SOCKS4 support],
263 [ case "$withval" in
264   no)
265     AC_MSG_RESULT(no)
266     ;;
267   *)
268     AC_MSG_RESULT(yes)
269     socks=4
270
271     if test -d "$withval/include"; then
272       CFLAGS="$CFLAGS -I$withval/include"
273     else
274       CFLAGS="$CFLAGS -I$withval"
275     fi
276     if test -d "$withval/lib"; then
277       withval="-L$withval/lib -lsocks"
278     else
279       withval="-L$withval -lsocks"
280     fi
281
282     LIBS="$withval $LIBS"
283
284     AC_TRY_LINK([],
285                 [ Rconnect(); ],
286                 [],
287                 [ AC_MSG_ERROR(Could not find SOCKS4 library.)])
288       ;;
289   esac ],
290   AC_MSG_RESULT(no)
291 )
292
293 # SOCKS5 support checking
294 AC_MSG_CHECKING(whether to support SOCKS5)
295 AC_ARG_WITH(socks5,
296 [  --with-socks5[=PATH]      Compile with SOCKS5 support],
297 [ case "$withval" in
298   no)
299     AC_MSG_RESULT(no)
300     ;;
301   *)
302     AC_MSG_RESULT(yes)
303     socks=5
304
305     if test -d "$withval/include"; then
306       CFLAGS="$CFLAGS -I$withval/include"
307     else
308       CFLAGS="$CFLAGS -I$withval"
309     fi
310     if test -d "$withval/lib"; then
311       withval="-L$withval/lib -lsocks5"
312     else
313       withval="-L$withval -lsocks5"
314     fi
315
316     LIBS="$withval $LIBS"
317
318     AC_TRY_LINK([],
319                 [ SOCKSconnect(); ],
320                 [],
321                 [ AC_MSG_ERROR(Could not find SOCKS5 library.)])
322       ;;
323   esac ],
324   AC_MSG_RESULT(no)
325 )
326
327 if test "x$socks" = "x4"; then
328   AC_DEFINE(SOCKS)
329   CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
330 fi
331
332 if test "x$socks" = "x5"; then
333   AC_DEFINE(SOCKS)
334   AC_DEFINE(SOCKS5)
335   AC_DEFINE(Rconnect, SOCKSconnect)
336   AC_DEFINE(Rgetsockname, SOCKSgetsockname)
337   AC_DEFINE(Rgetpeername, SOCKSgetpeername)
338   AC_DEFINE(Rbind, SOCKSbind)
339   AC_DEFINE(Raccept, SOCKSaccept)
340   AC_DEFINE(Rlisten, SOCKSlisten)
341   AC_DEFINE(Rselect, SOCKSselect)
342   AC_DEFINE(Rrecvfrom, SOCKSrecvfrom)
343   AC_DEFINE(Rsendto, SOCKSsendto)
344   AC_DEFINE(Rrecv, SOCKSrecv)
345   AC_DEFINE(Rsend, SOCKSsend)
346   AC_DEFINE(Rread, SOCKSread)
347   AC_DEFINE(Rwrite, SOCKSwrite)
348   AC_DEFINE(Rrresvport, SOCKSrresvport)
349   AC_DEFINE(Rshutdown, SOCKSshutdown)
350   AC_DEFINE(Rlisten, SOCKSlisten)
351   AC_DEFINE(Rclose, SOCKSclose)
352   AC_DEFINE(Rdup, SOCKSdup)
353   AC_DEFINE(Rdup2, SOCKSdup2)
354   AC_DEFINE(Rfclose, SOCKSfclose)
355   AC_DEFINE(Rgethostbyname, SOCKSgethostbyname)
356 fi
357
358 #
359 # MP library checking. First check whether user wants to use GMP and use
360 # it if found. If not or not defined then compile the MPI library in the
361 # source tree.
362 #
363 AC_MSG_CHECKING(whether to support GMP)
364 AC_ARG_WITH(gmp,
365 [  --with-gmp[=PATH]         Compile with GMP support instead of MPI],
366 [ case "$withval" in
367   no)
368     AC_MSG_RESULT(no)
369     mp_gmp=false
370     ;;
371   *)
372     AC_MSG_RESULT(yes)
373
374     if test -d "$withval/include"; then
375       CFLAGS="$CFLAGS -I$withval/include"
376     else
377       CFLAGS="$CFLAGS -I$withval"
378     fi
379     if test -d "$withval/lib"; then
380       withval="-L$withval/lib -lgmp"
381     else
382       withval="-L$withval -lgmp"
383     fi
384
385     LIBS="$withval $LIBS"
386     mp_gmp=false
387     AC_CHECK_LIB(gmp, __gmpz_init,
388       mp_gmp=true
389       AC_DEFINE(SILC_MP_GMP)
390       AC_MSG_RESULT(Using GMP as MP library)
391     )
392       ;;
393   esac ],
394   AC_MSG_RESULT(no)
395   mp_gmp=false
396 )
397
398 AM_CONDITIONAL(SILC_MP_GMP, test x$mp_gmp = xtrue)
399 AM_CONDITIONAL(SILC_MP_NSS_MPI, test x$mp_gmp = xfalse)
400 if test x$mp_gmp = xfalse; then
401   AC_DEFINE(SILC_MP_NSS_MPI)
402   AC_MSG_RESULT(Using NSS MPI as MP library)
403 fi
404
405 AC_ARG_WITH(silcd-config-file,
406 [  --with-silcd-config-file[=PATH]
407                           Use PATH as default configuration file in SILC
408                           server [/etc/silc/silcd.conf]],
409 [ AC_DEFINE_UNQUOTED(SILC_SERVER_CONFIG_FILE, "$withval") ])
410
411 if test "x$localstatedir" != 'x${prefix}/var'; then
412         PIDFILE="$localstatedir/silcd.pid"
413 else
414         PIDFILE="$silc_prefix/var/silcd.pid"
415 fi
416 AC_ARG_WITH(silcd-pid-file,
417 [  --with-silcd-pid-file[=PATH]
418                           Use PATH as default pid file in SILC
419                           server [/var/run/silcd.pid]],
420 [ case "$withval" in
421         no)
422                 ;;
423         yes)
424                 PIDFILE="$withval"
425                 ;;
426         *)
427                 PIDFILE="$withval"
428                 ;;
429         esac ],
430 )
431 AC_SUBST(PIDFILE)
432
433 #
434 # Native WIN32 compilation under cygwin
435 #
436 AC_ARG_WITH(win32,
437 [  --with-win32            Compile native WIN32 code (-mno-cygwin)],
438 [ AC_DEFINE(SILC_WIN32)
439   win32_support=true
440   CFLAGS="-mno-cygwin $CFLAGS"
441   LIBS="$LIBS -lwsock32" ])
442
443 AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
444
445 #
446 # Native EPOC support (disabled by default)
447 #
448 AM_CONDITIONAL(SILC_EPOC, test xfalse = xtrue)
449
450 #
451 # Native BeOS support (disabled by default)
452 #
453 AM_CONDITIONAL(SILC_BEOS, test xfalse = xtrue)
454
455 #
456 # Native OS2 support (disabled by default)
457 #
458 AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue)
459
460 #
461 # --without-irssi
462 #
463 without_irssi=false
464 AC_ARG_WITH(irssi,
465 [  --without-irssi         Compile without Irssi SILC Client],
466 [ without_irssi=true
467   SILC_DIST_SUBDIRS=`echo $SILC_DIST_SUBDIRS | $sedpath -e 's/irssi//'`
468 ])
469
470 #
471 # --without-silcd
472 #
473 without_silcd=false
474 AC_ARG_WITH(silcd,
475 [  --without-silcd         Compile without SILC Server],
476 [ without_silcd=true
477   SILC_DIST_SUBDIRS=`echo $SILC_DIST_SUBDIRS | $sedpath -e 's/silcd//'`
478 ])
479
480 #
481 # IPv6 support
482 #
483 AC_MSG_CHECKING(for IPv6 support)
484 AC_ARG_ENABLE(ipv6,
485 [  --enable-ipv6           Enable IPv6 support],
486 [ case "${enableval}" in
487   yes)
488     want_ipv6=true
489     check_ipv6=false
490     AC_DEFINE(HAVE_IPV6)
491     AC_MSG_RESULT(yes)
492     ;;
493   *)
494     want_ipv6=false
495     check_ipv6=false
496     AC_MSG_RESULT(no)
497     ;;
498 esac ], check_ipv6=true)
499
500 if test x$check_ipv6 = xtrue; then
501   AC_TRY_COMPILE([#ifdef HAVE_NETINET_TCP_H
502                   #include <netinet/tcp.h>
503                   #endif
504                   #ifdef HAVE_NETDB_H
505                   #include <netdb.h>
506                   #endif
507                   #include <sys/socket.h>
508                   #ifdef HAVE_NETDB_IN_H
509                   #include <netinet/in.h>
510                   #endif],
511                   [struct sockaddr_in6 sin6;
512                    int family = AF_INET6;
513                   ], [AC_DEFINE(HAVE_IPV6)
514                       AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])
515 fi
516
517 #
518 # Debug checking
519 #
520 AC_MSG_CHECKING(for enabled debugging)
521 AC_ARG_ENABLE(debug,
522 [  --enable-debug          Enable debugging],
523 [ case "${enableval}" in
524   yes)
525     AC_MSG_RESULT(yes)
526     AC_DEFINE(SILC_DEBUG)
527     CFLAGS="-O -g $CFLAGS"
528     ;;
529   *)
530     AC_MSG_RESULT(no)
531     CFLAGS="-O2 -g $CFLAGS"
532     ;;
533 esac ], CFLAGS="-O2 -g $CFLAGS"
534         AC_MSG_RESULT(no))
535
536 AC_MSG_CHECKING(for enabled stack tracing)
537 AC_ARG_ENABLE(stack-trace,
538 [  --enable-stack-trace    Enable memory stack trace],
539 [ case "${enableval}" in
540   yes)
541     AC_MSG_RESULT(yes)
542     AC_DEFINE(SILC_STACKTRACE)
543     ;;
544   *)
545     AC_MSG_RESULT(no)
546     ;;
547 esac ], AC_MSG_RESULT(no))
548
549 #
550 # Disable all assembler optimizations
551 #
552 AC_ARG_ENABLE(asm,
553 [  --disable-asm           Do not use assembler optimizations ],
554 [])
555
556 #
557 # Threads support
558 #
559 AC_ARG_ENABLE(threads,
560 [  --disable-threads       Do not compile with multi-thread support],
561 [ case "${enableval}" in
562   yes)
563     want_threads=true
564     check_threads=true
565     ;;
566   *)
567     want_threads=false
568     check_threads=false
569     ;;
570 esac ])
571
572 if test x$check_threads = xtrue; then
573 want_threads=false
574 AC_CHECK_HEADERS(pthread.h,
575         [ AC_DEFINE(SILC_HAVE_PTHREAD)
576           want_threads=true ],
577         [ if test -f /usr/pkg/include/pthread.h ; then
578             AC_DEFINE(SILC_HAVE_PTHREAD)
579             AC_MSG_RESULT(Found pthread.h in /usr/pkg/include/)
580             CFLAGS="$CFLAGS -I/usr/pkg/include"
581             want_threads=true
582           elif test -f /usr/contrib/include/pthread.h ; then
583             AC_DEFINE(SILC_HAVE_PTHREAD)
584             AC_MSG_RESULT(Found pthread.h in /usr/contrib/include/)
585             CFLAGS="$CFLAGS -I/usr/contrib/include"
586             want_threads=true
587           fi
588         ])
589 fi
590
591 AM_CONDITIONAL(SILC_THREADS, test x$want_threads = xtrue)
592 if test x$want_threads = xtrue; then
593   TMP_LIBS="$LIBS"
594   LIBS="-lpthread"
595   AC_TRY_LINK([#include <pthread.h>],
596               [pthread_attr_t attr; pthread_attr_init(&attr);],
597   AC_DEFINE(SILC_THREADS),
598   LIBS="-L/usr/pkg/lib -lpthread"
599   AC_TRY_LINK([#include <pthread.h>],
600               [pthread_attr_t attr; pthread_attr_init(&attr);],
601   AC_DEFINE(SILC_THREADS),
602   LIBS="-L/usr/contrib/lib -lpthread"
603   AC_TRY_LINK([#include <pthread.h>],
604               [pthread_attr_t attr; pthread_attr_init(&attr);],
605   AC_DEFINE(SILC_THREADS),
606   LIBS=""
607   )))
608
609   CFLAGS="$CFLAGS -D_REENTRANT"
610   case $host in
611     *-aix*)
612       CFLAGS="$CFLAGS -D_THREAD_SAFE"
613       if test x"$GCC" = xyes; then
614         CFLAGS="$CFLAGS -mthreads"
615       fi
616       ;;
617     *-freebsd2.2*)
618       CFLAGS="$CFLAGS -D_THREAD_SAFE"
619       ;;
620     *-sysv5uw7*)  # UnixWare 7
621       if test "$GCC" != "yes"; then
622         CFLAGS="$CFLAGS -Kthread"
623       else
624         CFLAGS="$CFLAGS -pthread"
625       fi
626       ;;
627     *-dg-dgux*)  # DG/UX
628       CFLAGS="$CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
629       ;;
630     esac
631
632   LIBS="$TMP_LIBS $LIBS"
633 fi
634
635 #
636 # Other configure scripts
637 #
638 if test x$without_irssi = xfalse; then
639   if test "x$silc_dist" = "xsilc-client" ||
640      test "x$silc_dist" = "xsilc-toolkit"; then
641   AC_CONFIG_SUBDIRS(irssi)
642   fi
643 fi
644
645 AC_CONFIG_SUBDIRS(lib/silcmath/mpi)
646 #AC_CONFIG_SUBDIRS(lib/zlib)
647
648 SILC_TOP_SRCDIR=`pwd`
649 AC_SUBST(SILC_TOP_SRCDIR)
650 #SILC_INSTALL_PREFIX=$ac_default_prefix
651 #AC_SUBST(SILC_INSTALL_PREFIX)
652 AC_SUBST(LIBS)
653 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
654 AC_SUBST(INCLUDE_DEFINES_INT)
655 AC_SUBST(SILC_DIST_SUBDIRS)
656
657 #
658 # Makefile outputs
659 #
660 AC_CONFIG_FILES(
661 Makefile
662 Makefile.defines
663 Makefile.defines_int
664 doc/Makefile
665 includes/Makefile
666 lib/Makefile
667 lib/contrib/Makefile
668 lib/silccore/Makefile
669 lib/silccrypt/Makefile
670 lib/silcmath/Makefile
671 lib/silcmath/mpi/Makefile.defines
672 lib/silcmath/mpi/Makefile.defines_int
673 lib/silcsim/Makefile
674 lib/silcske/Makefile
675 lib/silcutil/Makefile
676 lib/silcutil/unix/Makefile
677 lib/silcutil/win32/Makefile
678 lib/silcutil/beos/Makefile
679 lib/silcutil/os2/Makefile
680 lib/silcutil/epoc/Makefile
681 lib/silcsftp/Makefile
682 lib/silcsftp/tests/Makefile
683 doc/example_silcd.conf
684 )
685
686 if test "x$silc_dist" = "xsilc-client" ||
687    test "x$silc_dist" = "xsilc-toolkit"; then
688 AC_CONFIG_FILES(lib/silcclient/Makefile)
689 fi
690
691 if test x$without_irssi = xfalse ; then
692 if test "x$silc_dist" = "xsilc-client" ||
693    test "x$silc_dist" = "xsilc-toolkit"; then
694 AC_CONFIG_FILES(
695 irssi/Makefile.defines
696 irssi/Makefile.defines_int
697 )
698 fi
699 fi
700
701 if test x$without_silcd = xfalse ; then
702 if test "x$silc_dist" = "xsilc-server" ||
703    test "x$silc_dist" = "xsilc-toolkit"; then
704 AC_CONFIG_FILES(
705 silcd/Makefile
706 )
707 fi
708 fi
709
710 if test "x$silc_dist" = "xsilc-toolkit"; then
711 AC_CONFIG_FILES(
712 silc/Makefile
713 win32/Makefile
714 win32/libsilc/Makefile
715 win32/libsilcclient/Makefile
716 )
717 fi
718
719 AC_OUTPUT