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