Debian Codegraph @

addons/sqlbox/bootstrap

raw
1 #! /bin/sh
2 set -x
3 set -e
4
5 # Check for automake
6 amvers="no"
7 if automake-1.11 --version >/dev/null 2>&1; then
8 amvers="-1.11"
9 elif automake-1.10 --version >/dev/null 2>&1; then
10 amvers="-1.10"
11 elif automake-1.9 --version >/dev/null 2>&1; then
12 amvers="-1.9"
13 elif automake-1.8 --version >/dev/null 2>&1; then
14 amvers="-1.8"
15 elif automake-1.7 --version >/dev/null 2>&1; then
16 amvers="-1.7"
17 elif automake-1.6 --version >/dev/null 2>&1; then
18 amvers="-1.6"
19 elif automake-1.5 --version >/dev/null 2>&1; then
20 amvers="-1.5"
21 elif automake --version > /dev/null 2>&1; then
22 amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`"
23 if expr "$amvers" "<" "1.5" > /dev/null 2>&1; then
24 amvers="no"
25 else
26 amvers=""
27 fi
28 fi
29
30 if test "$amvers" = "no"; then
31 set +x
32 echo "$0: you need automake version 1.5 or later"
33 exit 1
34 fi
35
36 # Check for libtool
37 libtoolize="no"
38 if glibtoolize --version >/dev/null 2>&1; then
39 libtoolize="glibtoolize"
40 elif libtoolize --version >/dev/null 2>&1; then
41 libtoolize="libtoolize"
42 fi
43
44 if test "$libtoolize" = "no"; then
45 set +x
46 echo "$0: you need libtool"
47 exit 1
48 fi
49
50 # Remove old cruft
51 set +x; for x in aclocal.m4 configure config.guess config.log config.sub config.cache config.h.in config.h compile libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh; do rm -f $x autotools/$x; done; rm -Rf autom4te.cache; set -x
52 if test ! -d autotools; then mkdir autotools; fi
53
54 # Bootstrap package
55 ${libtoolize} --copy --force
56 if test -f "ltmain.sh"; then
57 echo "$0: working around a minor libtool issue"
58 mv ltmain.sh autotools/
59 fi
60
61 aclocal${amvers} -I autotools
62 autoconf
63 autoheader
64 #add --include-deps if you want to bootstrap with any other compiler than gcc
65 #automake${amvers} --add-missing --copy --include-deps
66 automake${amvers} --add-missing --copy