# $Id$
#
-if [ -d /usr/local/gnu-autotools/bin ] ; then
- PATH=/usr/local/gnu-autotools/bin:${PATH}
- export PATH
- FIX_BROKEN_FREEBSD_PORTS="-I /usr/local/share/aclocal"
-fi
+warn() {
+ echo "WARNING: $@" 1>&2
+}
+
+case `uname -s` in
+Darwin)
+ LIBTOOLIZE=glibtoolize
+ ;;
+FreeBSD)
+ LIBTOOLIZE=libtoolize
+ if [ -d /usr/local/gnu-autotools/bin ] ; then
+ PATH=/usr/local/gnu-autotools/bin:${PATH}
+ export PATH
+ FIX_BROKEN_FREEBSD_PORTS="-I /usr/local/share/aclocal"
+ fi
+ ;;
+Linux)
+ LIBTOOLIZE=libtoolize
+ ;;
+esac
automake_version=$(automake --version | tr ' ' '\n' | egrep '^[0-9]\.[0-9a-z.-]+')
if [ -z "$automake_version" ] ; then
- echo "unable to determine automake version"
- exit 1
+ warn "unable to determine automake version"
else
case $automake_version in
0.*|1.[0-8]|1.[0-8][.-]*)
- echo "your version of automake ($automake_version) is too old;" \
- "you need 1.9 or newer."
- exit 1
+ warn "automake ($automake_version) detected; 1.9 or newer recommended"
;;
*)
;;
set -ex
aclocal ${FIX_BROKEN_FREEBSD_PORTS}
-libtoolize --copy --force
+$LIBTOOLIZE --copy --force
autoheader
automake --add-missing --copy --foreign
autoconf