-# $Id: buildconf.sh,v 1.24 2006-11-22 09:42:27 adam Exp $
-if automake --version|head -1 |grep '1\.[4-7]'; then
+
+automake=automake
+aclocal=aclocal
+autoconf=autoconf
+libtoolize=libtoolize
+autoheader=autoheader
+
+test -d config || mkdir config
+if [ -d .git ]; then
+ git submodule init
+ git submodule update
+fi
+if [ "`uname -s`" = FreeBSD ]; then
+ # FreeBSD intalls the various auto* tools with version numbers
+ echo "Using special configuration for FreeBSD ..."
+ automake=automake19
+ aclocal="aclocal19 -I /usr/local/share/aclocal"
+ autoconf=autoconf259
+ libtoolize=libtoolize15
+ autoheader=autoheader259
+fi
+
+if [ "`uname -s`" = Darwin ]; then
+ echo "Using special configuration for Darwin/MacOS ..."
+ libtoolize=glibtoolize
+fi
+
+if $automake --version|head -1 |grep '1\.[4-7]'; then