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"
12 if [ "$1" = "" ]; then
15 if [ "${1:0:1}" == "/" ]; then
22 # treat any other parameters as additional configure flags
23 if [ "$1" != "" ]; then
32 for file in aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10 aclocal-1.11
; do
33 version
=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,\.,,g; p; }'`
34 if [ "$version" -gt 17 ];
42 if [ -z "$my_aclocal" ];
44 echo "***************************************************************"
46 echo "Aclocal version >= 1.7 is required. If it is already installed,"
47 echo "set enviroment variable ACLOCAL to point to it."
48 echo "(for example in bash do: \"export ACLOCAL=/pathto/aclocal-1.7\")"
50 echo "***************************************************************"
54 if [ -n "$AUTOHEADER" ];
56 my_autoheader
=$AUTOHEADER
58 for file in autoheader autoheader-2.57 autoheader-2.58 autoheader-2.59 autoheader-2.60 autoheader-2.61 autoheader-2.62
; do
59 version
=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,\.,,g; p; }'`
60 if [ "$version" -gt 257 ];
68 if [ -z "$my_autoheader" ];
70 echo "*********************************************************************"
72 echo "Autoheader version >= 2.57 is required. If it is already installed,"
73 echo "set enviroment variable AUTOHEADER to point to it."
74 echo "(for example in bash do: \"export AUTOHEADER=/pathto/autoheader-2.58\")"
76 echo "*********************************************************************"
80 if [ -n "$LIBTOOLIZE" ];
82 my_libtoolize
=$LIBTOOLIZE
84 for file in libtoolize
; do
85 libtool_version
=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,,,g; p; }'`
86 libtool_version_major
=`echo "$libtool_version" | cut -d. -f1`
87 libtool_version_minor
=`echo "$libtool_version" | cut -d. -f2`
88 echo libtool version
: "$libtool_version_major".
"$libtool_version_minor"
89 if [ "$libtool_version_major" -gt 1 ] ||
[ "$libtool_version_minor" -gt 4 ];
97 if [ -z "$my_libtoolize" ];
99 echo "***************************************************************"
101 echo "Libtool version >= 1.5 is required. If it is already installed,"
102 echo "set enviroment variable LIBTOOLIZE to point to it."
103 echo "(for example in bash do: \"export LIBTOOLIZE=/pathto/libtoolize\")"
105 echo "***************************************************************"
109 if [ -n "$AUTOMAKE" ];
111 my_automake
=$AUTOMAKE
113 for file in automake automake-1.7 automake-1.8 automake-1.9 automake-1.10 automake-1.11
; do
114 version
=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,\.,,g; p; }'`
115 if [ "$version" -gt 17 ];
123 if [ -z "$my_automake" ];
125 echo "***************************************************************"
127 echo "Automake version >= 1.7 is required. If it is already installed,"
128 echo "set enviroment variable AUTOMAKE to point to it."
129 echo "(for example in bash do: \"export AUTOMAKE=/pathto/automake-1.7\")"
131 echo "***************************************************************"
135 if [ -n "$AUTOCONF" ];
137 my_autoconf
=$AUTOCONF
139 for file in autoconf autoconf-2.57 autoconf-2.58 autoconf-2.59 autoconf-2.60 autoconf-2.61 autoconf-2.62
; do
140 version
=`$file --version | sed -n '1 { s/^[^ ]* (.*) //; s/ .*$//; s,\.,,g; p; }'`
141 if [ "$version" -gt 257 ];
149 if [ -z "$my_autoconf" ];
151 echo "*****************************************************************"
153 echo "Autoconf version >= 2.58 is required. If it is already installed,"
154 echo "set enviroment variable AUTOCONF to point to it."
155 echo "(for example in bash do: \"export AUTOCONF=/pathto/autoconf-2.58\")"
157 echo "*********************************************************************"
161 echo Running libtoolize
162 if [ "$libtool_version_major" = "2" ]; then
163 $my_libtoolize --force --no-warn
165 $my_libtoolize --force
169 $my_aclocal -W no-syntax ||
$my_aclocal ||
exit 1
171 echo Running autoconf
172 $my_autoconf ||
exit 1
174 echo Running autoheader
175 $my_autoheader ||
exit 1
177 echo Running automake
178 $my_automake --add-missing ||
exit 1
180 if test -z "$NOCONFIGURE"; then
181 echo Running configure
183 cmd
="./configure --prefix=$dest/ --bindir=$dest/ --sysconfdir=$dest/ --datadir=$dest/ --libdir=$dest --disable-subdirs"
187 echo "Configure was invoked as: $cmd $extra_args"