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
7
# DO NOT ALTER next line
8
# arch-tag: c714f9db-4c43-4b92-9624-7fd40d7a30fc
11
# Autotool versions preferred. To override either edit the script
12
# to match the versions you want to use, or set the variables on
13
# the command line like "env acver=.. amver=... ./bootstrap.sh"
14
acversions="${acver:-2.58 2.57 2.53 2.52}"
15
amversions="${amver:-1.8 1.7 1.6 1.5}"
19
eval $2 --version 2>/dev/null | grep -i "$1.*$3" >/dev/null
28
for version in $versions; do
29
for variant in "" "-${version}" "`echo $version | sed -e 's/\.//g'`"; do
30
if check_version $tool ${tool}${variant} $version; then
35
if [ "x$found" != "xNOT_FOUND" ]; then
39
if [ "x$found" = "xNOT_FOUND" ]; then
40
echo "WARNING: Cannot find $tool version $versions" >&2
41
echo "Trying `$tool --version | head -1`" >&2
52
echo "Autotool bootstrapping failed. You will need to investigate and correct" ;
53
echo "before you can develop on this source tree"
59
# Adjust paths of required autool packages
60
amver=`find_version automake ${amversions}`
61
acver=`find_version autoconf ${acversions}`
64
# Set environment variable to tell automake which autoconf to use.
65
AUTOCONF="autoconf${acver}" ; export AUTOCONF
72
if (test -d $dir); then
74
echo "Bootstrapping $dir"
76
# Make sure cfgaux exists
78
# Bootstrap the autotool subsystems
79
bootstrap aclocal$amver
80
#workaround for Automake 1.5
81
if grep m4_regex aclocal.m4 >/dev/null; then
82
perl -i.bak -p -e 's/m4_patsubst/m4_bpatsubst/g; s/m4_regexp/m4_bregexp/g;' aclocal.m4
84
bootstrap autoheader$acver
85
bootstrap libtoolize --automake
86
bootstrap automake$amver --foreign --add-missing
87
bootstrap autoconf$acver ); then
95
echo "Autotool bootstrapping complete."