6 # Copyright (C) 2007, 2008 Francesco Salvestrini
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; either version 2 of the License, or
11 # (at your option) any later version.
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.
18 # You should have received a copy of the GNU General Public License along
19 # with this program; if not, write to the Free Software Foundation, Inc.,
20 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32 if test x
"$PROGRAM" = x
""; then
40 if test -f $i/$PROGRAM; then
52 AUTOHEADER
=`missing autoheader`
53 ACLOCAL
=`missing aclocal`
54 AUTOCONF
=`missing autoconf`
55 AUTOMAKE
=`missing automake`
56 AUTORECONF
=`missing autoreconf`
57 LIBTOOL
=`( missing glibtool || missing libtool )`
58 LIBTOOLIZE
=`( missing glibtoolize || missing libtoolize)`
59 GNULIBTOOL
=`missing gnulib-tool`
62 # Dump some useful informations
64 echo "$ME: Dumping build-tools information ..."
76 if test -n "$tool" ; then
77 TOOLVER
=`$tool --version | head -1`
78 echo "$ME: $tool -> $TOOLVER"
83 # Remove files left from the previous run
85 echo "$ME: Removing autotools related files and directories ..."
86 rm -f `find ./ -name "Makefile.in"` ||
exit 1
87 rm -f config.cache aclocal.
m4 config.h.
in configure ||
exit 1
88 rm -f config.guess config.sub ltmain.sh ||
exit 1
89 rm -rf autom4te.cache ||
exit 1
90 rm -rf `find ./ -name ".deps"` ||
exit 1
95 echo "$ME: Building configure.ac from configure.ac.in"
97 VERSION
=`git tag -l | sort -s -t '.' -k 1,1n -k 2,2n -k 3,3n | tail -n 1`
98 cat configure.ac.
in |
sed -e 's,[@]VERSION[@],'$VERSION',' > configure.ac || \
99 { rm -f configure.ac
; exit 1 ; }
100 chmod a-w configure.ac
105 if test -n "$GNULIBTOOL" ; then
109 --macro-prefix GNULIB \
111 --aux-dir=.
/tools
/autotools \
112 --m4-base=.
/tools
/autotools
/m4 \
113 --source-base=.
/src
/gnulib \
114 --import crypto
/md5
crypto
/sha1 getopt ||
exit 1
120 echo "$ME: Handling autotools bootstrap ..."
122 echo "$ME: Running autoreconf ..."
123 $ACLOCAL --force --install -I .
/tools
/autotools
/m4 && \
124 $AUTORECONF --verbose --force --install -Wall ||
{