Added lib/silcvcard/
[silc.git] / lib / configure.ad
1 #ifdef SILC_DIST_LIB
2 #
3 #  lib/configure.ad
4 #
5 #  Author: Pekka Riikonen <priikone@silcnet.org>
6 #
7 #  Copyright (C) 2005 Pekka Riikonen
8 #
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.
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 if test x$compile_libs = xtrue; then
20
21 ##
22 ## Will compile included libs
23 ##
24 AC_MSG_NOTICE([Configuring SILC libraries])
25
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"
30 #ifdef SILC_DIST_MATH
31 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcmath"
32 #endif SILC_DIST_MATH
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/silcske"
35 #ifdef SILC_DIST_SFTP
36 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcsftp"
37 #endif SILC_DIST_SFTP
38 #ifdef SILC_DIST_SIM
39 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcsim"
40 #endif SILC_DIST_SIM
41 #ifdef SILC_DIST_CLIENTLIB
42 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcclient"
43 #endif SILC_DIST_CLIENTLIB
44 #ifdef SILC_DIST_ASN1
45 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcasn1"
46 #endif SILC_DIST_ASN1
47 #ifdef SILC_DIST_SKR
48 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcskr"
49 #endif SILC_DIST_SKR
50 #ifdef SILC_DIST_SERVERLIB
51 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcserver"
52 #endif SILC_DIST_SERVERLIB
53 #ifdef SILC_DIST_HTTP
54 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silchttp"
55 #endif SILC_DIST_HTTP
56 #ifdef SILC_DIST_IDCACHE
57 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcidcache"
58 #endif SILC_DIST_IDCACHE
59 #ifdef SILC_DIST_VCARD
60 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcvcard"
61 #endif SILC_DIST_VCARD
62
63 ##
64 ## Library versioning.
65 ##
66 # Do the releases and library versioning according to following rules:
67 #
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
73 #
74 # where [LIB] is LIBSILC, LIBSILCCLIENT or LIBSILCSERVER, and where 
75 # "functions" means functions public interfaces (API).
76 #
77 # The LIB_BASE_VERSION defines the SILC software major.minor version and
78 # it is increment only when these version numbers actually change.
79 #
80
81 # Base version for libraries.  Do not change this unless SILC version
82 # changes too.
83 LIB_BASE_VERSION=1.1
84
85 # libsilc versions
86 LIBSILC_CURRENT=1               # prev = 0
87 LIBSILC_REVISION=0              # prev = 0
88 LIBSILC_AGE=0                   # prev = 0
89
90 # libsilcclient versions
91 LIBSILCCLIENT_CURRENT=1         # prev = 0
92 LIBSILCCLIENT_REVISION=0        # prev = 0
93 LIBSILCCLIENT_AGE=0             # prev = 0
94
95 # libsilcserver versions
96 LIBSILCSERVER_CURRENT=1         # prev = 0
97 LIBSILCSERVER_REVISION=0        # prev = 0
98 LIBSILCSERVER_AGE=0             # prev = 0
99
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)
111
112 #ifdef SILC_DIST_SIM
113 # SIM modules directory
114 #
115 MODULESDIR="$silc_prefix/modules"
116 AC_ARG_WITH(simdir,
117   [[  --with-simdir=DIR       directory for SIM modules [PREFIX/modules]]],
118   [
119     case "$withval" in
120       no|yes)
121         ;;
122       *)
123         MODULESDIR="$withval"
124         ;;
125     esac
126   ])
127 AC_SUBST(MODULESDIR)
128 AC_DEFINE_UNQUOTED([SILC_MODULESDIR], "$MODULESDIR", [SILC_MODULESDIR])
129 #endif SILC_DIST_SIM
130
131 #ifdef SILC_DIST_TOOLKIT
132 # Stack trace checking
133 #
134 AC_MSG_CHECKING(whether to enable stack tracing)
135 AC_ARG_ENABLE(stack-trace,
136   [  --enable-stack-trace    enable memory stack trace],
137   [
138     case "${enableval}" in
139     yes)
140       AC_MSG_RESULT(yes)
141       AC_DEFINE([SILC_STACKTRACE], [], [SILC_STACKTRACE])
142       ;;
143     *)
144       AC_MSG_RESULT(no)
145       ;;
146     esac
147   ],
148     AC_MSG_RESULT(no)
149   )
150 #endif SILC_DIST_TOOLKIT
151
152 #
153 # Makefile outputs
154 #
155 AC_CONFIG_FILES(
156 lib/Makefile
157 lib/contrib/Makefile
158 lib/silccore/Makefile
159 lib/silccrypt/Makefile
160 #ifdef SILC_DIST_SIM
161 lib/silcsim/Makefile
162 #endif SILC_DIST_SIM
163 lib/silcske/Makefile
164 lib/silcutil/Makefile
165 lib/silcutil/unix/Makefile
166 lib/silcutil/win32/Makefile
167 lib/silcutil/beos/Makefile
168 lib/silcutil/os2/Makefile
169 lib/silcutil/epoc/Makefile
170 #ifdef SILC_DIST_SFTP
171 lib/silcsftp/Makefile
172 #endif SILC_DIST_SFTP
173 #ifdef SILC_DIST_INPLACE
174 lib/silcutil/tests/Makefile
175 lib/silccrypt/tests/Makefile
176 lib/silccore/tests/Makefile
177 lib/silcsftp/tests/Makefile
178 #endif SILC_DIST_INPLACE
179 )
180
181 #ifdef SILC_DIST_TOOLKIT
182 AC_CONFIG_FILES(
183 lib/silc.pc
184 lib/silcclient.pc
185 lib/silcserver.pc
186 )
187 #endif SILC_DIST_TOOLKIT
188
189 #ifdef SILC_DIST_CLIENTLIB
190 AC_CONFIG_FILES(lib/silcclient/Makefile)
191 #endif SILC_DIST_CLIENTLIB
192
193 #ifdef SILC_DIST_SERVERLIB
194 AC_CONFIG_FILES(
195 lib/silcserver/Makefile
196 lib/silcserver/tests/Makefile
197 )
198 #endif SILC_DIST_SERVERLIB
199
200 #ifdef SILC_DIST_ASN1
201 AC_CONFIG_FILES(
202 lib/silcasn1/Makefile
203 #ifdef SILC_DIST_INPLACE
204 lib/silcasn1/tests/Makefile
205 #endif SILC_DIST_INPLACE
206 )
207 #endif SILC_DIST_ASN1
208
209 #ifdef SILC_DIST_SKR
210 AC_CONFIG_FILES(
211 lib/silcskr/Makefile
212 #ifdef SILC_DIST_INPLACE
213 lib/silcskr/tests/Makefile
214 #endif SILC_DIST_INPLACE
215 )
216 #endif SILC_DIST_SKR
217
218 #ifdef SILC_DIST_HTTP
219 AC_CONFIG_FILES(
220 lib/silchttp/Makefile
221 lib/silchttp/tests/Makefile
222 )
223 #endif SILC_DIST_HTTP
224
225 #ifdef SILC_DIST_IDCACHE
226 AC_CONFIG_FILES(
227 lib/silcidcache/Makefile
228 )
229 #endif SILC_DIST_IDCACHE
230
231 #ifdef SILC_DIST_VCARD
232 AC_CONFIG_FILES(
233 lib/silcvcard/Makefile
234 )
235 #endif SILC_DIST_VCARD
236
237 fi      # compile_libs
238
239 #endif SILC_DIST_LIB