The Autodist environment added.
[silc.git] / lib / configure.ad
1 #
2 #  lib/configure.ad
3 #
4 #  Author: Pekka Riikonen <priikone@silcnet.org>
5 #
6 #  Copyright (C) 2005 Pekka Riikonen
7 #
8 #  This program is free software; you can redistribute it and/or modify
9 #  it under the terms of the GNU General Public License as published by
10 #  the Free Software Foundation; version 2 of the License.
11 #
12 #  This program is distributed in the hope that it will be useful,
13 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #  GNU General Public License for more details.
16 #
17
18 if test x$compile_libs = xtrue; then
19
20 ##
21 ## Will compile included libs
22 ##
23 AC_MSG_NOTICE([Configuring SILC libraries])
24
25 # SILC Library directories
26 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silccore"
27 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silccrypt"
28 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcmath"
29 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcmath/mpi"
30 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcske"
31 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcsim"
32 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcutil"
33 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcsftp"
34 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/contrib"
35 #ifdef SILC_DIST_CLIENT
36 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcclient"
37 #endif SILC_DIST_CLIENT
38
39 ##
40 ## Library versioning.
41 ##
42 # Do the releases and library versioning according to following rules:
43 #
44 #  - If any code has changed in library, increment [LIB]_REVISION
45 #  - If functions were added, set [LIB]_REVISION to 0
46 #  - If functions were added, removed or changed, increment [LIB]_CURRENT
47 #  - If functions were added, increment [LIB]_AGE
48 #  - If functions were removed, set [LIB]_AGE to 0
49 #
50 # where [LIB] is LIBSILC and LIBSILCCLIENT, and where "functions" means
51 # functions public interfaces.
52 #
53 # The LIB_BASE_VERSION defines the SILC software major.minor version and
54 # it is increment only when these version numbers actually change.
55 #
56
57 # Base version for libraries.  Do not change this unless SILC version
58 # changes too.
59 LIB_BASE_VERSION=1.0
60
61 # libsilc versions
62 LIBSILC_CURRENT=3
63 LIBSILC_REVISION=0
64 LIBSILC_AGE=2
65
66 # libsilcclient versions
67 LIBSILCCLIENT_CURRENT=3
68 LIBSILCCLIENT_REVISION=0
69 LIBSILCCLIENT_AGE=2
70
71 # Substitute the version numbers
72 AC_SUBST(LIB_BASE_VERSION)
73 AC_SUBST(LIBSILC_CURRENT)
74 AC_SUBST(LIBSILC_REVISION)
75 AC_SUBST(LIBSILC_AGE)
76 AC_SUBST(LIBSILCCLIENT_CURRENT)
77 AC_SUBST(LIBSILCCLIENT_REVISION)
78 AC_SUBST(LIBSILCCLIENT_AGE)
79
80 # Make enable-shared aware
81 AM_CONDITIONAL(SILC_ENABLE_SHARED, test "$enable_shared" = yes)
82
83 # Stack trace checking
84 #
85 AC_MSG_CHECKING(whether to enable stack tracing)
86 AC_ARG_ENABLE(stack-trace,
87   [  --enable-stack-trace    enable memory stack trace],
88   [
89     case "${enableval}" in
90     yes)
91       AC_MSG_RESULT(yes)
92       AC_DEFINE([SILC_STACKTRACE], [], [SILC_STACKTRACE])
93       ;;
94     *)
95       AC_MSG_RESULT(no)
96       ;;
97     esac
98   ],
99     AC_MSG_RESULT(no)
100   )
101
102 #
103 # Makefile outputs
104 #
105 AC_CONFIG_FILES(
106 lib/Makefile
107 lib/contrib/Makefile
108 lib/silccore/Makefile
109 lib/silccrypt/Makefile
110 lib/silcsim/Makefile
111 lib/silcske/Makefile
112 lib/silcutil/Makefile
113 lib/silcutil/unix/Makefile
114 lib/silcutil/win32/Makefile
115 lib/silcutil/beos/Makefile
116 lib/silcutil/os2/Makefile
117 lib/silcutil/epoc/Makefile
118 lib/silcmath/Makefile
119 lib/silcsftp/Makefile
120 #ifdef SILC_DIST_INPLACE
121 lib/silcutil/tests/Makefile
122 lib/silccrypt/tests/Makefile
123 lib/silccore/tests/Makefile
124 lib/silcsftp/tests/Makefile
125 #endif SILC_DIST_INPLACE
126 )
127
128 #ifdef SILC_DIST_TOOLKIT
129 AC_CONFIG_FILES(
130 lib/silc.pc
131 lib/silcclient.pc
132 )
133 #endif SILC_DIST_TOOLKIT
134
135 #ifdef SILC_DIST_CLIENTLIB
136 AC_CONFIG_FILES(lib/silcclient/Makefile)
137 #endif SILC_DIST_CLIENTLIB
138
139 fi      # compile_libs
140