4 # Gentoo and Mandrake specific flags
5 export WANT_AUTOMAKE
="1.10"
6 export WANT_AUTOCONF
="2.5"
8 # FreeBSD favourite paths
9 #export CXXFLAGS="-ggdb -I/usr/local/include"
10 #export LDFLAGS="-ggdb -L/usr/local/lib"
14 The autotools build system is NO LONGER MAINTAINED and may be dropped in
15 future versions! Please switch to using cmake instead.
19 if [ "$1" = "" ]; then
22 if [ "${1:0:1}" == "/" ]; then
29 # treat any other parameters as additional configure flags
30 if [ "$1" != "" ]; then
39 for file in aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10 aclocal-1.11
; do
40 version
=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,\.,,g; p; }'`
41 if [ "$version" -gt 17 ];
49 if [ -z "$my_aclocal" ];
51 echo "***************************************************************"
53 echo "Aclocal version >= 1.7 is required. If it is already installed,"
54 echo "set enviroment variable ACLOCAL to point to it."
55 echo "(for example in bash do: \"export ACLOCAL=/pathto/aclocal-1.7\")"
57 echo "***************************************************************"
61 if [ -n "$AUTOHEADER" ];
63 my_autoheader
=$AUTOHEADER
65 for file in autoheader autoheader-2.57 autoheader-2.58 autoheader-2.59 autoheader-2.60 autoheader-2.61 autoheader-2.62
; do
66 version
=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,\.,,g; p; }'`
67 if [ "$version" -gt 257 ];
75 if [ -z "$my_autoheader" ];
77 echo "*********************************************************************"
79 echo "Autoheader version >= 2.57 is required. If it is already installed,"
80 echo "set enviroment variable AUTOHEADER to point to it."
81 echo "(for example in bash do: \"export AUTOHEADER=/pathto/autoheader-2.58\")"
83 echo "*********************************************************************"
87 if [ -n "$LIBTOOLIZE" ];
89 my_libtoolize
=$LIBTOOLIZE
91 for file in libtoolize
; do
92 libtool_version
=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,,,g; p; }'`
93 libtool_version_major
=`echo "$libtool_version" | cut -d. -f1`
94 libtool_version_minor
=`echo "$libtool_version" | cut -d. -f2`
95 echo libtool version
: "$libtool_version_major".
"$libtool_version_minor"
96 if [ "$libtool_version_major" -gt 1 ] ||
[ "$libtool_version_minor" -gt 4 ];
104 if [ -z "$my_libtoolize" ];
106 echo "***************************************************************"
108 echo "Libtool version >= 1.5 is required. If it is already installed,"
109 echo "set enviroment variable LIBTOOLIZE to point to it."
110 echo "(for example in bash do: \"export LIBTOOLIZE=/pathto/libtoolize\")"
112 echo "***************************************************************"
116 if [ -n "$AUTOMAKE" ];
118 my_automake
=$AUTOMAKE
120 for file in automake automake-1.7 automake-1.8 automake-1.9 automake-1.10 automake-1.11
; do
121 version
=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,\.,,g; p; }'`
122 if [ "$version" -gt 17 ];
130 if [ -z "$my_automake" ];
132 echo "***************************************************************"
134 echo "Automake version >= 1.7 is required. If it is already installed,"
135 echo "set enviroment variable AUTOMAKE to point to it."
136 echo "(for example in bash do: \"export AUTOMAKE=/pathto/automake-1.7\")"
138 echo "***************************************************************"
142 if [ -n "$AUTOCONF" ];
144 my_autoconf
=$AUTOCONF
146 for file in autoconf autoconf-2.57 autoconf-2.58 autoconf-2.59 autoconf-2.60 autoconf-2.61 autoconf-2.62
; do
147 version
=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,\.,,g; p; }'`
148 if [ "$version" -gt 257 ];
156 if [ -z "$my_autoconf" ];
158 echo "*****************************************************************"
160 echo "Autoconf version >= 2.58 is required. If it is already installed,"
161 echo "set enviroment variable AUTOCONF to point to it."
162 echo "(for example in bash do: \"export AUTOCONF=/pathto/autoconf-2.58\")"
164 echo "*********************************************************************"
168 echo Running libtoolize
169 if [ "$libtool_version_major" = "2" ]; then
170 $my_libtoolize --force --no-warn
172 $my_libtoolize --force
176 $my_aclocal -W no-syntax ||
$my_aclocal ||
exit 1
178 echo Running autoconf
179 $my_autoconf ||
exit 1
181 echo Running autoheader
182 $my_autoheader ||
exit 1
184 echo Running automake
185 $my_automake --add-missing ||
exit 1
187 if test -z "$NOCONFIGURE"; then
188 echo Running configure
190 cmd
="./configure --prefix=$dest/ --bindir=$dest/ --sysconfdir=$dest/ --datadir=$dest/ --libdir=$dest --disable-subdirs"
194 echo "Configure was invoked as: $cmd $extra_args"