[6e09c4]: autogen.sh Maximize Restore History

Download this file

autogen.sh    196 lines (169 with data), 5.2 kB

  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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
#!/bin/sh
# Gentoo and Mandrake specific flags
export WANT_AUTOMAKE="1.10"
export WANT_AUTOCONF="2.5"
# FreeBSD favourite paths
#export CXXFLAGS="-ggdb -I/usr/local/include"
#export LDFLAGS="-ggdb -L/usr/local/lib"
echo "
The autotools build system is NO LONGER MAINTAINED and may be dropped in
future versions! Please switch to using cmake instead.
"
if [ "$1" = "" ]; then
dest=$HOME/GemRB
else
if [ "${1:0:1}" == "/" ]; then
dest=$1
else
dest=$PWD/$1
fi
shift
# treat any other parameters as additional configure flags
if [ "$1" != "" ]; then
extra_args="$@"
fi
fi
if [ -n "$ACLOCAL" ];
then
my_aclocal=$ACLOCAL
else
for file in aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10 aclocal-1.11; do
version=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,\.,,g; p; }'`
if [ "$version" -gt 17 ];
then
my_aclocal=$file
break
fi
done
fi
if [ -z "$my_aclocal" ];
then
echo "***************************************************************"
echo
echo "Aclocal version >= 1.7 is required. If it is already installed,"
echo "set enviroment variable ACLOCAL to point to it."
echo "(for example in bash do: \"export ACLOCAL=/pathto/aclocal-1.7\")"
echo
echo "***************************************************************"
exit 1
fi
if [ -n "$AUTOHEADER" ];
then
my_autoheader=$AUTOHEADER
else
for file in autoheader autoheader-2.57 autoheader-2.58 autoheader-2.59 autoheader-2.60 autoheader-2.61 autoheader-2.62; do
version=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,\.,,g; p; }'`
if [ "$version" -gt 257 ];
then
my_autoheader=$file
break
fi
done
fi
if [ -z "$my_autoheader" ];
then
echo "*********************************************************************"
echo
echo "Autoheader version >= 2.57 is required. If it is already installed,"
echo "set enviroment variable AUTOHEADER to point to it."
echo "(for example in bash do: \"export AUTOHEADER=/pathto/autoheader-2.58\")"
echo
echo "*********************************************************************"
exit 1
fi
if [ -n "$LIBTOOLIZE" ];
then
my_libtoolize=$LIBTOOLIZE
else
for file in libtoolize; do
libtool_version=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,,,g; p; }'`
libtool_version_major=`echo "$libtool_version" | cut -d. -f1`
libtool_version_minor=`echo "$libtool_version" | cut -d. -f2`
echo libtool version: "$libtool_version_major"."$libtool_version_minor"
if [ "$libtool_version_major" -gt 1 ] || [ "$libtool_version_minor" -gt 4 ];
then
my_libtoolize=$file
break
fi
done
fi
if [ -z "$my_libtoolize" ];
then
echo "***************************************************************"
echo
echo "Libtool version >= 1.5 is required. If it is already installed,"
echo "set enviroment variable LIBTOOLIZE to point to it."
echo "(for example in bash do: \"export LIBTOOLIZE=/pathto/libtoolize\")"
echo
echo "***************************************************************"
exit 1
fi
if [ -n "$AUTOMAKE" ];
then
my_automake=$AUTOMAKE
else
for file in automake automake-1.7 automake-1.8 automake-1.9 automake-1.10 automake-1.11; do
version=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,\.,,g; p; }'`
if [ "$version" -gt 17 ];
then
my_automake=$file
break
fi
done
fi
if [ -z "$my_automake" ];
then
echo "***************************************************************"
echo
echo "Automake version >= 1.7 is required. If it is already installed,"
echo "set enviroment variable AUTOMAKE to point to it."
echo "(for example in bash do: \"export AUTOMAKE=/pathto/automake-1.7\")"
echo
echo "***************************************************************"
exit 1
fi
if [ -n "$AUTOCONF" ];
then
my_autoconf=$AUTOCONF
else
for file in autoconf autoconf-2.57 autoconf-2.58 autoconf-2.59 autoconf-2.60 autoconf-2.61 autoconf-2.62; do
version=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,\.,,g; p; }'`
if [ "$version" -gt 257 ];
then
my_autoconf=$file
break
fi
done
fi
if [ -z "$my_autoconf" ];
then
echo "*****************************************************************"
echo
echo "Autoconf version >= 2.58 is required. If it is already installed,"
echo "set enviroment variable AUTOCONF to point to it."
echo "(for example in bash do: \"export AUTOCONF=/pathto/autoconf-2.58\")"
echo
echo "*********************************************************************"
exit 1
fi
echo Running libtoolize
if [ "$libtool_version_major" = "2" ]; then
$my_libtoolize --force --no-warn
else
$my_libtoolize --force
fi || exit 1
echo Running aclocal
$my_aclocal -W no-syntax || $my_aclocal || exit 1
echo Running autoconf
$my_autoconf || exit 1
echo Running autoheader
$my_autoheader || exit 1
echo Running automake
$my_automake --add-missing || exit 1
if test -z "$NOCONFIGURE"; then
echo Running configure
cmd="./configure --prefix=$dest/ --bindir=$dest/ --sysconfdir=$dest/ --datadir=$dest/ --libdir=$dest --disable-subdirs"
$cmd "$extra_args"
echo
echo "Configure was invoked as: $cmd $extra_args"
fi