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 #ifdef SILC_DIST_CRYPTO
30 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silccrypt"
31 #endif SILC_DIST_CRYPTO
33 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcmath"
35 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcutil"
36 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcapputil"
37 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcske"
39 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcsftp"
42 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcsim"
44 #ifdef SILC_DIST_CLIENTLIB
45 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcclient"
46 #endif SILC_DIST_CLIENTLIB
48 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcasn1"
51 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcskr"
53 #ifdef SILC_DIST_SERVERLIB
54 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcserver"
55 #endif SILC_DIST_SERVERLIB
57 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silchttp"
59 #ifdef SILC_DIST_VCARD
60 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcvcard"
61 #endif SILC_DIST_VCARD
64 ## Library versioning.
66 # Do the releases and library versioning according to following rules:
68 # - If any code has changed in library, increment [LIB]_REVISION
69 # - If functions were added, removed or changed, set [LIB]_REVISION to 0
70 # - If functions were added, removed or changed, increment [LIB]_CURRENT
71 # - If functions were added, increment [LIB]_AGE
72 # - If functions were removed, set [LIB]_AGE to 0
74 # where [LIB] is LIBSILC, LIBSILCCLIENT or LIBSILCSERVER, and where
75 # "functions" means functions public interfaces (API).
77 # The LIB_BASE_VERSION defines the SILC software major.minor version and
78 # it is increment only when these version numbers actually change.
81 # Base version for libraries. Do not change this unless SILC version
86 LIBSILC_CURRENT=3 # prev = 2
87 LIBSILC_REVISION=0 # prev = 1
88 LIBSILC_AGE=1 # prev = 1
90 # libsilcclient versions
91 LIBSILCCLIENT_CURRENT=3 # prev = 2
92 LIBSILCCLIENT_REVISION=0 # prev = 1
93 LIBSILCCLIENT_AGE=0 # prev = 0
95 # libsilcserver versions
96 LIBSILCSERVER_CURRENT=1 # prev = 0
97 LIBSILCSERVER_REVISION=0 # prev = 0
98 LIBSILCSERVER_AGE=0 # prev = 0
100 # Substitute the version numbers
101 AC_SUBST(LIB_BASE_VERSION)
102 AC_SUBST(LIBSILC_CURRENT)
103 AC_SUBST(LIBSILC_REVISION)
104 AC_SUBST(LIBSILC_AGE)
105 AC_SUBST(LIBSILCCLIENT_CURRENT)
106 AC_SUBST(LIBSILCCLIENT_REVISION)
107 AC_SUBST(LIBSILCCLIENT_AGE)
108 AC_SUBST(LIBSILCSERVER_CURRENT)
109 AC_SUBST(LIBSILCSERVER_REVISION)
110 AC_SUBST(LIBSILCSERVER_AGE)
112 # Check for big-endian machines
115 # Check for epoll_wait and verify that epoll_create works
116 AC_CHECK_FUNC(epoll_wait,
120 #include <sys/epoll.h>
123 int ret = epoll_create(5);
131 AC_DEFINE([HAVE_EPOLL_WAIT], [1], [HAVE_EPOLL_WAIT])
136 MODULESDIR="$silc_prefix/lib/modules"
138 # SIM modules directory
141 [[ --with-simdir=DIR directory for SIM modules [PREFIX/modules]]],
147 MODULESDIR="$withval"
151 AC_DEFINE_UNQUOTED([SILC_MODULESDIR], "$MODULESDIR", [SILC_MODULESDIR])
155 #ifdef SILC_DIST_TOOLKIT
156 # Stack trace checking
158 AC_MSG_CHECKING(whether to enable stack tracing)
159 AC_ARG_ENABLE(stack-trace,
160 [ --enable-stack-trace enable memory stack trace],
162 case "${enableval}" in
165 AC_DEFINE([SILC_STACKTRACE], [], [SILC_STACKTRACE])
166 CFLAGS="$CFLAGS -rdynamic"
167 PC_CFLAGS="$PC_CFLAGS -rdynamic"
176 #endif SILC_DIST_TOOLKIT
178 #ifdef SILC_DIST_INPLACE
180 # Profiling options (never delivered to distributions)
182 AC_MSG_CHECKING(whether to enable gprof)
184 [ --enable-gprof enable gprof profiling],
186 case "${enableval}" in
201 AC_MSG_CHECKING(whether to enable gcov)
203 [ --enable-gcov enable gcov],
205 case "${enableval}" in
208 SILC_ADD_CFLAGS(-fprofile-arcs)
219 #endif SILC_DIST_INPLACE
227 lib/silccore/Makefile
232 lib/silcutil/Makefile
233 #ifdef SILC_DIST_TOOLKIT
234 lib/silcutil/unix/Makefile
235 lib/silcutil/win32/Makefile
236 lib/silcutil/symbian/Makefile
237 #else !SILC_DIST_TOOLKIT
238 #ifdef SILC_DIST_CLIENT
239 lib/silcutil/unix/Makefile
240 lib/silcutil/win32/Makefile
241 #else !SILC_DIST_CLIENT
242 #ifdef SILC_DIST_SERVER
243 lib/silcutil/unix/Makefile
244 #endif SILC_DIST_SERVER
245 #endif SILC_DIST_CLIENT
246 #endif SILC_DIST_TOOLKIT
247 lib/silcapputil/Makefile
248 #ifdef SILC_DIST_SFTP
249 lib/silcsftp/Makefile
250 #endif SILC_DIST_SFTP
251 #ifdef SILC_DIST_INPLACE
252 lib/silcutil/tests/Makefile
253 lib/silccore/tests/Makefile
254 lib/silcsftp/tests/Makefile
255 #endif SILC_DIST_INPLACE
258 #ifdef SILC_DIST_TOOLKIT
264 #endif SILC_DIST_TOOLKIT
266 #ifdef SILC_DIST_CLIENTLIB
268 lib/silcclient/Makefile
269 lib/silcclient/tests/Makefile
271 #endif SILC_DIST_CLIENTLIB
273 #ifdef SILC_DIST_SERVERLIB
275 lib/silcserver/Makefile
276 lib/silcserver/tests/Makefile
278 #endif SILC_DIST_SERVERLIB
280 #ifdef SILC_DIST_ASN1
282 lib/silcasn1/Makefile
283 #ifdef SILC_DIST_INPLACE
284 lib/silcasn1/tests/Makefile
285 #endif SILC_DIST_INPLACE
287 #endif SILC_DIST_ASN1
292 #ifdef SILC_DIST_INPLACE
293 lib/silcskr/tests/Makefile
294 #endif SILC_DIST_INPLACE
298 #ifdef SILC_DIST_HTTP
300 lib/silchttp/Makefile
301 #ifdef SILC_DIST_INPLACE
302 lib/silchttp/tests/Makefile
303 #endif SILC_DIST_INPLACE
305 #endif SILC_DIST_HTTP
307 #ifdef SILC_DIST_VCARD
309 lib/silcvcard/Makefile
311 #endif SILC_DIST_VCARD