fe741247767bf9cbbffb5267e79af4f0954ff024
[silc.git] / prepare
1 #!/bin/sh
2 #
3 #  prepare
4 #
5 #  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
6 #
7 #  Copyright (C) 2000 - 2001 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; either version 2 of the License, or
12 #  (at your option) any later version.
13 #
14 #  This program is distributed in the hope that it will be useful,
15 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 #  GNU General Public License for more details.
18 #
19
20 #
21 # Prepares SILC source tree for configuration and compilation. This is
22 # done only after checkout from CVS. This is only for developers of SILC
23 # and will never appear in public distribution. When creating distributions
24 # this is always run first. After the distribution is created all
25 # temporary files (including these prepare* scripts) are removed.
26 #
27
28 SILC_VERSION=0.1.1
29
30 version=$1
31 if test "$version" = ""; then
32   version=$SILC_VERSION;
33 fi
34
35 echo "Preparing SILC source tree for configuration and compilation..."
36
37 # Replace version string and create configure.in
38 sed -e "/SILC_VERSION/s//$version/" configure.in.pre >configure.in
39
40 aclocal
41 autoconf
42 autoheader
43 automake
44
45 cd lib/trq
46 aclocal
47 autoconf
48 autoheader
49 automake >/dev/null 2>/dev/null
50 cd ../..
51
52 file=includes/version_internal.h
53 echo "/* Automatically generated by ./prepare */" >$file
54 echo "#define SILC_VERSION_STRING \"$version\"" >>$file
55 echo "#define SILC_PROTOCOL_VERSION_STRING \"SILC-1.0-$version\"" >>$file
56
57 echo "Done, now run ./configure and make."