]>
Commit | Line | Data |
---|---|---|
74b984b6 | 1 | #!/bin/sh |
a2794549 | 2 | # Used to setup the configure.in, autoheader and Makefile.in's if configure |
3 | # has not been generated. This script is only needed for developers when | |
4 | # configure has not been run, or if a Makefile.am in a non-configured directory | |
5 | # has been updated | |
6 | ||
c3d3f1cf | 7 | # Autotool versions required. To override either edit the script |
8 | # to match the versions you want to use, or set the variables on | |
9 | # the command line like "env acver=.. amver=... ./bootstrap.sh" | |
10 | acver="${acver:-2.53}" | |
11 | amver="${amver:-1.5}" | |
96b8d5c3 | 12 | |
13 | bootstrap() { | |
307aa7bb | 14 | if "$@"; then |
15 | true # Everything OK | |
16 | else | |
96b8d5c3 | 17 | echo "$1 failed" |
18 | echo "Autotool bootstrapping failed. You will need to investigate and correct" ; | |
19 | echo "before you can develop on this source tree" | |
20 | exit 1 | |
b4468b69 | 21 | fi |
96b8d5c3 | 22 | } |
23 | ||
24 | # Make sure cfgaux exists | |
25 | mkdir -p cfgaux | |
26 | ||
74b984b6 | 27 | # Adjust paths of required autool packages |
c3d3f1cf | 28 | if autoconf --version | grep -q "$acver"; then |
29 | acver="" | |
30 | fi | |
31 | if automake --version | grep -q "$amver"; then | |
32 | amver="" | |
33 | fi | |
74b984b6 | 34 | acver=`echo $acver | sed -e 's/\.//'` |
c3d3f1cf | 35 | amver=`echo $amver | sed -e 's/\.//'` |
74b984b6 | 36 | |
96b8d5c3 | 37 | # Bootstrap the autotool subsystems |
74b984b6 | 38 | bootstrap aclocal$amver |
39 | bootstrap autoheader$acver | |
40 | bootstrap automake$amver --foreign --add-missing | |
41 | bootstrap autoconf$acver | |
b4468b69 | 42 | |
96b8d5c3 | 43 | echo "Autotool bootstrapping complete." |