3
# get two strings of version numbers
4
# parse the two strings and compare
5
function compare_versions() {
6
cat <<EOF > /tmp/$$.awk
7
/[0-9]+\.[0-9]+(\.[0-9]+)?[ ]+[0-9]+\.[0-9]+(\.[0-9]+)?/{
9
nb = split(vb,b,"[.]");
11
na = split(va,a,"[.]");
12
for (i = na + 1; i < 4; i++) {
15
for (i = nb + 1; i < 4; i++) {
18
for (i = 1; i <= 3; i++) {
20
# print "FAIL:" va ">" vb " at index:" i;
22
} else if (b[i] > a[i]) {
23
# print "OK:" va "<" vb " at index:" i;
27
# print "OK:" va "==" vb;
34
echo "$1 $2 " | awk -f /tmp/$$.awk
41
\rm -rf autom4te.cache
43
\rm -f config/missing config/install-sh config/depcomp config/mkinstalldirs config/ltmain.sh config/config.sub config/config.guess
44
# make sure autoconf is up-to-date
45
ac_ver=`autoconf --version | head -n 1 | awk '{print $NF}'`
46
compare_versions 2.59 $ac_ver
48
echo Min autoconf version is 2.59
52
# make sure automake is up-to-date
53
am_ver=`automake --version | head -n 1 | awk '{print $NF}'`
54
compare_versions 1.9.2 $am_ver
56
echo Min automake version is 1.9.2
60
# make sure libtool is up-to-date
61
lt_ver=`libtool --version | head -n 1 | awk '{print $4}'`
62
compare_versions 1.4.2 $lt_ver
64
echo Min libtool version is 1.4.2
68
aclocal -I config 2>&1 | grep -v "arning: underquoted definition of"
69
libtoolize --automake --copy
70
automake --add-missing --gnu --copy --force