-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·120 lines (98 loc) · 2.96 KB
/
autogen.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/bin/sh
#
# a leftover cache from a different version will cause no end of headaches
rm -fr autom4te.cache
############################################################################
#
# autopoint (gettext)
#
echo "Checking autopoint version..."
ver=`autopoint --version | awk '{print $NF; exit}'`
ap_maj=`echo $ver | sed 's;\..*;;g'`
ap_min=`echo $ver | sed -e 's;^[0-9]*\.;;g' -e 's;\..*$;;g'`
ap_teeny=`echo $ver | sed -e 's;^[0-9]*\.[0-9]*\.;;g'`
echo " $ver"
case $ap_maj in
0)
if test $ap_min -lt 14 ; then
echo "You must have gettext >= 0.14.0 but you seem to have $ver"
exit 1
fi
;;
esac
echo "Running autopoint..."
autopoint --force || exit 1
############################################################################
#
# libtoolize (libtool)
#
echo "Checking libtoolize version..."
libtoolize --version 2>&1 > /dev/null
rc=$?
if test $rc -ne 0 ; then
echo "Could not determine the version of libtool on your machine"
echo "libtool --version produced:"
libtool --version
exit 1
fi
lt_ver=`libtoolize --version | awk '{print $NF; exit}'`
lt_maj=`echo $lt_ver | sed 's;\..*;;g'`
lt_min=`echo $lt_ver | sed -e 's;^[0-9]*\.;;g' -e 's;\..*$;;g'`
lt_teeny=`echo $lt_ver | sed -e 's;^[0-9]*\.[0-9]*\.;;g'`
echo " $lt_ver"
case $lt_maj in
0)
echo "You must have libtool >= 1.4.0 but you seem to have $lt_ver"
exit 1
;;
1)
if test $lt_min -lt 4 ; then
echo "You must have libtool >= 1.4.0 but you seem to have $lt_ver"
exit 1
fi
;;
2)
;;
*)
echo "You are running a newer libtool than gerbv has been tested with."
echo "It will probably work, but this is a warning that it may not."
;;
esac
echo "Running libtoolize..."
libtoolize --force --copy --automake || exit 1
############################################################################
#
# aclocal
echo "Checking aclocal version..."
acl_ver=`aclocal --version | awk '{print $NF; exit}'`
echo " $acl_ver"
echo "Running aclocal..."
aclocal -I m4 $ACLOCAL_FLAGS || exit 1
echo "... done with aclocal."
############################################################################
#
# autoheader
echo "Checking autoheader version..."
ah_ver=`autoheader --version | awk '{print $NF; exit}'`
echo " $ah_ver"
echo "Running autoheader..."
autoheader || exit 1
echo "... done with autoheader."
############################################################################
#
# automake
echo "Checking automake version..."
am_ver=`automake --version | awk '{print $NF; exit}'`
echo " $am_ver"
echo "Running automake..."
automake --force --copy --add-missing || exit 1
echo "... done with automake."
############################################################################
#
# autoconf
echo "Checking autoconf version..."
ac_ver=`autoconf --version | awk '{print $NF; exit}'`
echo " $ac_ver"
echo "Running autoconf..."
autoconf || exit 1
echo "... done with autoconf."