-
Notifications
You must be signed in to change notification settings - Fork 5
/
check_version.sh
executable file
·70 lines (65 loc) · 2.63 KB
/
check_version.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
echo "checking autotools..."
# autoconf 2.59 or newer
ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'`
if test -z "$ac_version"; then
echo "bootstrap: autoconf not found."
echo " You need autoconf version 2.59 or newer installed"
echo " to build IRSTLM from SVN."
echo " Please install autoconf version 2.59 or newer and set AUTOCONF variable accordingly."
exit 1
fi
IFS=_; set $ac_version; IFS=' '
ac_version=$1
IFS=.; set $ac_version; IFS=' '
if test "$1" = "2" -a "$2" -lt "59" || test "$1" -lt "2"; then
echo "bootstrap: autoconf version $ac_version found."
echo " You need autoconf version 2.59 or newer installed"
echo " to build IRSTLM from SVN."
echo " Please install autoconf version 2.59 or newer and set AUTOCONF variable accordingly."
exit 1
else
echo "bootstrap: autoconf version $ac_version (ok)"
fi
# automake 1.9 or newer
am_version=`${AUTOMAKE:-automake} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'`
if test -z "$am_version"; then
echo "bootstrap: automake not found."
echo " You need automake version 1.9 or newer installed"
echo " to build IRSTLM from SVN."
echo " Please install automake version 1.9 or newer and set AUTOMAKE variable accordingly."
exit 1
fi
IFS=_; set $am_version; IFS=' '
am_version=$1
IFS=.; set $am_version; IFS=' '
if test "$1" = "1" -a "$2" -lt "9"; then
echo "bootstrap: automake version $am_version found."
echo " You need automake version 1.9 or newer installed"
echo " to build IRSTLM from SVN."
echo " Please install automake version 1.9 or newer and set AUTOMAKE variable accordingly."
exit 1
else
echo "bootstrap: automake version $am_version (ok)"
fi
# aclocal 1.9 or newer
acl_version=`${ACLOCAL:-aclocal} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'`
if test -z "$acl_version"; then
echo "bootstrap: aclocal not found."
echo " You need aclocal version 1.9 or newer installed"
echo " to build IRSTLM from SVN."
echo " Please install aclocal version 1.9 or newer and set ACLOCAL variable accordingly."
exit 1
fi
IFS=_; set $acl_version; IFS=' '
acl_version=$1
IFS=.; set $acl_version; IFS=' '
if test "$1" = "1" -a "$2" -lt "9"; then
echo "bootstrap: aclocal version $acl_version found."
echo " You need aclocal version 1.9 or newer installed"
echo " to build IRSTLM SVN."
echo " Please install aclocal version 1.9 or newer and set ACLOCAL variable accordingly."
exit 1
else
echo "bootstrap: aclocal version $acl_version (ok)"
fi