4 # Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
6 # Copyright (C) 2000 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; either version 2 of the License, or
11 # (at your option) any later version.
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.
19 AC_INIT(includes/version.h)
22 CFLAGS="-Wall $CFLAGS"
25 # Put here any platform specific stuff
29 *-*-linux*|*-*-mklinux*)
30 CFLAGS="-D_GNU_SOURCE $CFLAGS"
36 AM_INIT_AUTOMAKE(silc, 28062000)
38 AM_CONFIG_HEADER(includes/silcdefs.h)
51 CFLAGS="-finline-functions $CFLAGS"
53 # Currently GCC is only supported compiler
54 AC_MSG_ERROR(GCC is only supported compiler currently)
67 # More header checking
68 AC_CHECK_HEADERS(unistd.h string.h getopt.h errno.h fcntl.h assert.h)
69 AC_CHECK_HEADERS(sys/types.h sys/stat.h sys/time.h)
70 AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h netdb.h)
71 AC_CHECK_HEADERS(pwd.h grp.h termcap.h)
72 AC_CHECK_HEADERS(ncurses.h signal.h ctype.h)
73 AC_CHECK_HEADERS(arpa/inet.h sys/mman.h)
83 AC_CHECK_FUNCS(chmod stat fstat getenv putenv strerror ctime gettimeofday)
84 AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid)
85 AC_CHECK_FUNCS(strchr strstr strcpy strncpy memcpy memset memmove)
86 AC_CHECK_FUNCS(gethostname gethostbyname gethostbyaddr)
87 AC_CHECK_FUNCS(select socket listen bind shutdown close connect)
88 AC_CHECK_FUNCS(fcntl setsockopt)
89 AC_CHECK_FUNCS(getservbyname getservbyport)
90 AC_CHECK_FUNCS(getopt_long time)
91 AC_CHECK_FUNCS(mlock munlock)
93 # SIM support checking
94 # XXX These needs to be changed as more supported platforms appear.
95 # XXX This probably needs to be made platform dependant check.
96 AC_CHECKING(for SIM support)
97 AC_CHECK_HEADERS(dlfcn.h,
98 AC_CHECK_LIB(dl, dlopen,
100 AC_MSG_RESULT(enabled SIM support)
102 AC_MSG_RESULT(no SIM support found)),
103 AC_MSG_RESULT(no SIM support found))
106 AC_MSG_CHECKING(for enabled debugging)
108 [ --enable-debug Enable debugging (warning: it is heavy!)],
109 [ case "${enableval}" in
112 AC_DEFINE(SILC_DEBUG)
113 CFLAGS="-O -g $CFLAGS"
119 esac ], CFLAGS="-O2 $CFLAGS"
123 #LIBS="$LIBS -lefence"
125 AC_ARG_WITH(silcd-config-file,
126 [ --with-silcd-config-file[=PATH]
127 Use PATH as default configuration file in SILC
129 [ AC_DEFINE_UNQUOTED(SILC_SERVER_CONFIG_FILE, "$withval") ])
131 # Other configure scripts
132 #AC_CONFIG_SUBDIRS(lib/zlib)
133 AC_CONFIG_SUBDIRS(lib/silcmath/gmp-3.0.1)
140 lib/silccore/Makefile
141 lib/silccrypt/Makefile
142 lib/silcmath/Makefile
144 lib/silcsim/modules/Makefile