Merged silc_1_0_branch to trunk.
[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 #ifdef SILC_DIST_MPI
33 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcmath/mpi"
34 #endif SILC_DIST_MPI
35 #endif SILC_DIST_MATH
36 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcutil"
37 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcske"
38 #ifdef SILC_DIST_SFTP
39 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcsftp"
40 #endif SILC_DIST_SFTP
41 #ifdef SILC_DIST_SIM
42 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcsim"
43 #endif SILC_DIST_SIM
44 #ifdef SILC_DIST_CLIENT
45 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcclient"
46 #endif SILC_DIST_CLIENT
47
48 ##
49 ## Library versioning.
50 ##
51 # Do the releases and library versioning according to following rules:
52 #
53 #  - If any code has changed in library, increment [LIB]_REVISION
54 #  - If functions were added, removed or changed, set [LIB]_REVISION to 0
55 #  - If functions were added, removed or changed, increment [LIB]_CURRENT
56 #  - If functions were added, increment [LIB]_AGE
57 #  - If functions were removed, set [LIB]_AGE to 0
58 #
59 # where [LIB] is LIBSILC and LIBSILCCLIENT, and where "functions" means
60 # functions public interfaces.
61 #
62 # The LIB_BASE_VERSION defines the SILC software major.minor version and
63 # it is increment only when these version numbers actually change.
64 #
65
66 # Base version for libraries.  Do not change this unless SILC version
67 # changes too.
68 LIB_BASE_VERSION=1.0
69
70 # libsilc versions
71 LIBSILC_CURRENT=5               # prev = 4
72 LIBSILC_REVISION=0              # prev = 0
73 LIBSILC_AGE=3                   # prev = 3
74
75 # libsilcclient versions
76 LIBSILCCLIENT_CURRENT=4         # prev = 4
77 LIBSILCCLIENT_REVISION=0        # prev = 0
78 LIBSILCCLIENT_AGE=3             # prev = 3
79
80 # Substitute the version numbers
81 AC_SUBST(LIB_BASE_VERSION)
82 AC_SUBST(LIBSILC_CURRENT)
83 AC_SUBST(LIBSILC_REVISION)
84 AC_SUBST(LIBSILC_AGE)
85 AC_SUBST(LIBSILCCLIENT_CURRENT)
86 AC_SUBST(LIBSILCCLIENT_REVISION)
87 AC_SUBST(LIBSILCCLIENT_AGE)
88
89 #ifdef SILC_DIST_TOOLKIT
90 # Stack trace checking
91 #
92 AC_MSG_CHECKING(whether to enable stack tracing)
93 AC_ARG_ENABLE(stack-trace,
94   [  --enable-stack-trace    enable memory stack trace],
95   [
96     case "${enableval}" in
97     yes)
98       AC_MSG_RESULT(yes)
99       AC_DEFINE([SILC_STACKTRACE], [], [SILC_STACKTRACE])
100       ;;
101     *)
102       AC_MSG_RESULT(no)
103       ;;
104     esac
105   ],
106     AC_MSG_RESULT(no)
107   )
108 #endif SILC_DIST_TOOLKIT
109
110 #
111 # Makefile outputs
112 #
113 AC_CONFIG_FILES(
114 lib/Makefile
115 lib/contrib/Makefile
116 lib/silccore/Makefile
117 lib/silccrypt/Makefile
118 #ifdef SILC_DIST_SIM
119 lib/silcsim/Makefile
120 #endif SILC_DIST_SIM
121 lib/silcske/Makefile
122 lib/silcutil/Makefile
123 lib/silcutil/unix/Makefile
124 lib/silcutil/win32/Makefile
125 lib/silcutil/beos/Makefile
126 lib/silcutil/os2/Makefile
127 lib/silcutil/epoc/Makefile
128 #ifdef SILC_DIST_MATH
129 lib/silcmath/Makefile
130 #endif SILC_DIST_MATH
131 #ifdef SILC_DIST_SFTP
132 lib/silcsftp/Makefile
133 #endif SILC_DIST_SFTP
134 #ifdef SILC_DIST_INPLACE
135 lib/silcutil/tests/Makefile
136 lib/silccrypt/tests/Makefile
137 lib/silccore/tests/Makefile
138 lib/silcsftp/tests/Makefile
139 #endif SILC_DIST_INPLACE
140 )
141
142 #ifdef SILC_DIST_TOOLKIT
143 AC_CONFIG_FILES(
144 lib/silc.pc
145 lib/silcclient.pc
146 )
147 #endif SILC_DIST_TOOLKIT
148
149 #ifdef SILC_DIST_CLIENTLIB
150 AC_CONFIG_FILES(lib/silcclient/Makefile)
151 #endif SILC_DIST_CLIENTLIB
152
153 fi      # compile_libs
154
155 #endif SILC_DIST_LIB