Externalize default config file: /conky/conky.conf
[monky] / autogen.sh
1 #!/bin/sh
2 #
3 # Conky, a system monitor, based on torsmo
4 #
5 # Any original torsmo code is licensed under the BSD license
6 #
7 # All code written since the fork of torsmo is licensed under the GPL
8 #
9 # Please see COPYING for details
10 #
11 # Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
12 # Copyright (c) 2005-2007 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
13 # All rights reserved.
14 #
15 # This program is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU General Public License as published by
17 # the Free Software Foundation, either version 3 of the License, or
18 # (at your option) any later version.
19 #
20 # This program is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
26 #
27 # $Id$
28 #
29 # optional $1 = optional directory containing build tree or svn working copy
30
31 AUTOCONF=${AUTOCONF:-autoconf}
32 AUTOMAKE=${AUTOMAKE:-automake}
33 ACLOCAL=${ACLOCAL:-aclocal}
34 AUTOHEADER=${AUTOHEADER:-autoheader}
35 LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
36
37 # identify svn revision, if an svn working copy
38 if test "$1" != "" && test -d "$1/.svn"; then
39     revision=`LC_ALL=C svn info $1 | awk '/^Revision: / {printf "%05d\n", $2}'`;
40 elif test -d ".svn"; then
41     revision=`LC_ALL=C svn info | awk '/^Revision: / {printf "%05d\n", $2}'`; 
42 else
43     revision="NONE"; fi
44
45 # generate configure.ac with substituted svn revision
46 sed -e "s/@REVISION@/${revision}/g" < "configure.ac.in" > "configure.ac"
47
48 echo Running $ACLOCAL -I m4 ... && $ACLOCAL -I m4
49 echo Running $LIBTOOLIZE --force --copy ... && $LIBTOOLIZE --force --copy
50 echo Running $AUTOHEADER ... && $AUTOHEADER
51 echo Running $AUTOMAKE --add-missing --copy --gnu ... && $AUTOMAKE --add-missing --copy --gnu
52 echo Running $AUTOCONF ... && $AUTOCONF