5 # Author: Pekka Riikonen <priikone@silcnet.org>
7 # Copyright (C) 2005, 2007 Pekka Riikonen
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; version 2 of the License.
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 if test x$compile_libs = xtrue; then
22 ## Will compile included libs
24 AC_MSG_NOTICE([Configuring SILC libraries])
26 # SILC Library directories
27 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/contrib"
28 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silccore"
29 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silccrypt"
31 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcmath"
33 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcutil"
34 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcapputil"
35 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcske"
37 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcsftp"
40 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcsim"
42 #ifdef SILC_DIST_CLIENTLIB
43 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcclient"
44 #endif SILC_DIST_CLIENTLIB
46 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcasn1"
49 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcskr"
51 #ifdef SILC_DIST_SERVERLIB
52 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcserver"
53 #endif SILC_DIST_SERVERLIB
55 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silchttp"
57 #ifdef SILC_DIST_VCARD
58 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcvcard"
59 #endif SILC_DIST_VCARD
62 ## Library versioning.
64 # Do the releases and library versioning according to following rules:
66 # - If any code has changed in library, increment [LIB]_REVISION
67 # - If functions were added, removed or changed, set [LIB]_REVISION to 0
68 # - If functions were added, removed or changed, increment [LIB]_CURRENT
69 # - If functions were added, increment [LIB]_AGE
70 # - If functions were removed, set [LIB]_AGE to 0
72 # where [LIB] is LIBSILC, LIBSILCCLIENT or LIBSILCSERVER, and where
73 # "functions" means functions public interfaces (API).
75 # The LIB_BASE_VERSION defines the SILC software major.minor version and
76 # it is increment only when these version numbers actually change.
79 # Base version for libraries. Do not change this unless SILC version
84 LIBSILC_CURRENT=1 # prev = 0
85 LIBSILC_REVISION=0 # prev = 0
86 LIBSILC_AGE=0 # prev = 0
88 # libsilcclient versions
89 LIBSILCCLIENT_CURRENT=1 # prev = 0
90 LIBSILCCLIENT_REVISION=0 # prev = 0
91 LIBSILCCLIENT_AGE=0 # prev = 0
93 # libsilcserver versions
94 LIBSILCSERVER_CURRENT=1 # prev = 0
95 LIBSILCSERVER_REVISION=0 # prev = 0
96 LIBSILCSERVER_AGE=0 # prev = 0
98 # Substitute the version numbers
99 AC_SUBST(LIB_BASE_VERSION)
100 AC_SUBST(LIBSILC_CURRENT)
101 AC_SUBST(LIBSILC_REVISION)
102 AC_SUBST(LIBSILC_AGE)
103 AC_SUBST(LIBSILCCLIENT_CURRENT)
104 AC_SUBST(LIBSILCCLIENT_REVISION)
105 AC_SUBST(LIBSILCCLIENT_AGE)
106 AC_SUBST(LIBSILCSERVER_CURRENT)
107 AC_SUBST(LIBSILCSERVER_REVISION)
108 AC_SUBST(LIBSILCSERVER_AGE)
110 # Check for big-endian machines
113 # Check for epoll_wait and verify that epoll_create works
114 AC_CHECK_FUNC(epoll_wait,
118 #include <sys/epoll.h>
121 int ret = epoll_create(5);
129 AC_DEFINE([HAVE_EPOLL_WAIT], [1], [HAVE_EPOLL_WAIT])
135 # SIM modules directory
137 MODULESDIR="$silc_prefix/modules"
139 [[ --with-simdir=DIR directory for SIM modules [PREFIX/modules]]],
145 MODULESDIR="$withval"
150 AC_DEFINE_UNQUOTED([SILC_MODULESDIR], "$MODULESDIR", [SILC_MODULESDIR])
153 #ifdef SILC_DIST_TOOLKIT
154 # Stack trace checking
156 AC_MSG_CHECKING(whether to enable stack tracing)
157 AC_ARG_ENABLE(stack-trace,
158 [ --enable-stack-trace enable memory stack trace],
160 case "${enableval}" in
163 AC_DEFINE([SILC_STACKTRACE], [], [SILC_STACKTRACE])
172 #endif SILC_DIST_TOOLKIT
174 #ifdef SILC_DIST_INPLACE
176 # Profiling options (never delivered to distributions)
178 AC_MSG_CHECKING(whether to enable gprof)
180 [ --enable-gprof enable gprof profiling],
182 case "${enableval}" in
197 AC_MSG_CHECKING(whether to enable gcov)
199 [ --enable-gcov enable gcov],
201 case "${enableval}" in
204 SILC_ADD_CFLAGS(-fprofile-arcs)
215 #endif SILC_DIST_INPLACE
223 lib/silccore/Makefile
228 lib/silcutil/Makefile
229 lib/silcutil/unix/Makefile
230 lib/silcutil/win32/Makefile
231 lib/silcapputil/Makefile
232 #ifdef SILC_DIST_SFTP
233 lib/silcsftp/Makefile
234 #endif SILC_DIST_SFTP
235 #ifdef SILC_DIST_INPLACE
236 lib/silcutil/tests/Makefile
237 lib/silccore/tests/Makefile
238 lib/silcsftp/tests/Makefile
239 #endif SILC_DIST_INPLACE
242 #ifdef SILC_DIST_TOOLKIT
248 #endif SILC_DIST_TOOLKIT
250 #ifdef SILC_DIST_CLIENTLIB
252 lib/silcclient/Makefile
253 lib/silcclient/tests/Makefile
255 #endif SILC_DIST_CLIENTLIB
257 #ifdef SILC_DIST_SERVERLIB
259 lib/silcserver/Makefile
260 lib/silcserver/tests/Makefile
262 #endif SILC_DIST_SERVERLIB
264 #ifdef SILC_DIST_ASN1
266 lib/silcasn1/Makefile
267 #ifdef SILC_DIST_INPLACE
268 lib/silcasn1/tests/Makefile
269 #endif SILC_DIST_INPLACE
271 #endif SILC_DIST_ASN1
276 #ifdef SILC_DIST_INPLACE
277 lib/silcskr/tests/Makefile
278 #endif SILC_DIST_INPLACE
282 #ifdef SILC_DIST_HTTP
284 lib/silchttp/Makefile
285 lib/silchttp/tests/Makefile
287 #endif SILC_DIST_HTTP
289 #ifdef SILC_DIST_VCARD
291 lib/silcvcard/Makefile
293 #endif SILC_DIST_VCARD