-# $Id: buildconf.sh,v 1.23 2006-10-29 17:19:07 adam Exp $
-if automake --version|head -1 |grep '1\.[4-7]'; then
+
+automake=automake
+aclocal=aclocal
+autoconf=autoconf
+libtoolize=libtoolize
+
+test -d config || mkdir config
+if test .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
+fi
+
+if $automake --version|head -1 |grep '1\.[4-7]'; then