Added SILC Server library.
[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
54 ##
55 ## Library versioning.
56 ##
57 # Do the releases and library versioning according to following rules:
58 #
59 #  - If any code has changed in library, increment [LIB]_REVISION
60 #  - If functions were added, removed or changed, set [LIB]_REVISION to 0
61 #  - If functions were added, removed or changed, increment [LIB]_CURRENT
62 #  - If functions were added, increment [LIB]_AGE
63 #  - If functions were removed, set [LIB]_AGE to 0
64 #
65 # where [LIB] is LIBSILC, LIBSILCCLIENT or LIBSILCSERVER, and where 
66 # "functions" means functions public interfaces (API).
67 #
68 # The LIB_BASE_VERSION defines the SILC software major.minor version and
69 # it is increment only when these version numbers actually change.
70 #
71
72 # Base version for libraries.  Do not change this unless SILC version
73 # changes too.
74 LIB_BASE_VERSION=1.1
75
76 # libsilc versions
77 LIBSILC_CURRENT=1               # prev = 0
78 LIBSILC_REVISION=0              # prev = 0
79 LIBSILC_AGE=0                   # prev = 0
80
81 # libsilcclient versions
82 LIBSILCCLIENT_CURRENT=1         # prev = 0
83 LIBSILCCLIENT_REVISION=0        # prev = 0
84 LIBSILCCLIENT_AGE=0             # prev = 0
85
86 # libsilcserver versions
87 LIBSILCSERVER_CURRENT=1         # prev = 0
88 LIBSILCSERVER_REVISION=0        # prev = 0
89 LIBSILCSERVER_AGE=0             # prev = 0
90
91 # Substitute the version numbers
92 AC_SUBST(LIB_BASE_VERSION)
93 AC_SUBST(LIBSILC_CURRENT)
94 AC_SUBST(LIBSILC_REVISION)
95 AC_SUBST(LIBSILC_AGE)
96 AC_SUBST(LIBSILCCLIENT_CURRENT)
97 AC_SUBST(LIBSILCCLIENT_REVISION)
98 AC_SUBST(LIBSILCCLIENT_AGE)
99 AC_SUBST(LIBSILCSERVER_CURRENT)
100 AC_SUBST(LIBSILCSERVER_REVISION)
101 AC_SUBST(LIBSILCSERVER_AGE)
102
103 #ifdef SILC_DIST_SIM
104 # SIM modules directory
105 #
106 MODULESDIR="$silc_prefix/modules"
107 AC_ARG_WITH(simdir,
108   [[  --with-simdir=DIR       directory for SIM modules [PREFIX/modules]]],
109   [
110     case "$withval" in
111       no|yes)
112         ;;
113       *)
114         MODULESDIR="$withval"
115         ;;
116     esac
117   ])
118 AC_SUBST(MODULESDIR)
119 AC_DEFINE_UNQUOTED([SILC_MODULESDIR], "$MODULESDIR", [SILC_MODULESDIR])
120 #endif SILC_DIST_SIM
121
122 #ifdef SILC_DIST_TOOLKIT
123 # Stack trace checking
124 #
125 AC_MSG_CHECKING(whether to enable stack tracing)
126 AC_ARG_ENABLE(stack-trace,
127   [  --enable-stack-trace    enable memory stack trace],
128   [
129     case "${enableval}" in
130     yes)
131       AC_MSG_RESULT(yes)
132       AC_DEFINE([SILC_STACKTRACE], [], [SILC_STACKTRACE])
133       ;;
134     *)
135       AC_MSG_RESULT(no)
136       ;;
137     esac
138   ],
139     AC_MSG_RESULT(no)
140   )
141 #endif SILC_DIST_TOOLKIT
142
143 #
144 # Makefile outputs
145 #
146 AC_CONFIG_FILES(
147 lib/Makefile
148 lib/contrib/Makefile
149 lib/silccore/Makefile
150 lib/silccrypt/Makefile
151 #ifdef SILC_DIST_SIM
152 lib/silcsim/Makefile
153 #endif SILC_DIST_SIM
154 lib/silcske/Makefile
155 lib/silcutil/Makefile
156 lib/silcutil/unix/Makefile
157 lib/silcutil/win32/Makefile
158 lib/silcutil/beos/Makefile
159 lib/silcutil/os2/Makefile
160 lib/silcutil/epoc/Makefile
161 #ifdef SILC_DIST_SFTP
162 lib/silcsftp/Makefile
163 #endif SILC_DIST_SFTP
164 #ifdef SILC_DIST_INPLACE
165 lib/silcutil/tests/Makefile
166 lib/silccrypt/tests/Makefile
167 lib/silccore/tests/Makefile
168 lib/silcsftp/tests/Makefile
169 #endif SILC_DIST_INPLACE
170 )
171
172 #ifdef SILC_DIST_TOOLKIT
173 AC_CONFIG_FILES(
174 lib/silc.pc
175 lib/silcclient.pc
176 lib/silcserver.pc
177 )
178 #endif SILC_DIST_TOOLKIT
179
180 #ifdef SILC_DIST_CLIENTLIB
181 AC_CONFIG_FILES(lib/silcclient/Makefile)
182 #endif SILC_DIST_CLIENTLIB
183
184 #ifdef SILC_DIST_SERVERLIB
185 AC_CONFIG_FILES(
186 lib/silcserver/Makefile
187 lib/silcserver/tests/Makefile
188 )
189 #endif SILC_DIST_SERVERLIB
190
191 #ifdef SILC_DIST_ASN1
192 AC_CONFIG_FILES(
193 lib/silcasn1/Makefile
194 #ifdef SILC_DIST_INPLACE
195 lib/silcasn1/tests/Makefile
196 #endif SILC_DIST_INPLACE
197 )
198 #endif SILC_DIST_ASN1
199
200 #ifdef SILC_DIST_SKR
201 AC_CONFIG_FILES(
202 lib/silcskr/Makefile
203 #ifdef SILC_DIST_INPLACE
204 lib/silcskr/tests/Makefile
205 #endif SILC_DIST_INPLACE
206 )
207 #endif SILC_DIST_SKR
208
209 fi      # compile_libs
210
211 #endif SILC_DIST_LIB