]>
Commit | Line | Data |
---|---|---|
f5429b2e MR |
1 | #!/bin/bash |
2 | ||
3 | echo "Rebuilding build system......" | |
4 | ||
5 | autoreconf --version 2>&1 > /dev/null 2>&1 | |
6 | ||
7 | if [ ! -e m4 ]; then | |
8 | mkdir m4 | |
9 | fi | |
10 | ||
11 | if [ $? -eq 0 ]; then | |
12 | AUTORECONF=autoreconf | |
13 | else | |
14 | AUTORECONF= | |
15 | fi | |
16 | ||
17 | error() { | |
18 | echo "Missing tool: $1" | |
19 | echo "Cannot proceed until the missing tool is available" | |
20 | exit 1 | |
21 | } | |
22 | ||
23 | if [ ! -z ${AUTORECONF} ]; then | |
24 | echo "Using autoreconf to rebuild build system" | |
25 | autoreconf --force --install --symlink | |
26 | else | |
27 | echo "No autoreconf found. Using plain old tools to rebuild build system" | |
28 | libtoolize --automake --force || error libtoolize | |
29 | aclocal -I m4 || error aclocal | |
30 | autoheader --force || error autoheader | |
31 | automake --add-missing --force-missing --gnu || error automake | |
32 | autoconf --force || error autoconf | |
33 | fi | |
34 | ./configure --enable-maintainer-mode $* | |
35 | ||
36 | exit 0 |