Index: bootstrap.sh
===================================================================
--- bootstrap.sh	(revision 9850)
+++ bootstrap.sh	(working copy)
@@ -82,7 +82,9 @@
 if test -z "$2"; then b=0 ; else b=$2;fi
 if test -z "$3"; then c=0 ; else c=$3;fi
 
-if test "$a" -lt "2"; then
+if test "$a" -eq "2"; then
+   lt_status="good"
+elif test "$a" -lt "2"; then
    if test "$b" -lt "5" -o "$b" =  "5" -a "$c" -lt "14" ; then
       lt_status="bad"
    fi
@@ -141,14 +143,14 @@
 # and libtool 1.4 by simply rerunning the bootstrap script.
 (cd build ; rm -f ltconfig ltmain.sh libtool.m4)
 
-$libtoolize --copy --automake
+$libtoolize --copy --force --automake
 
 if [ -f libtool.m4 ]; then 
    ltfile=`pwd`/libtool.m4
 else
-   ltfindcmd="`sed -n \"/=[^\\\`]/p;/libtool_m4=/{s/.*=/echo /p;q;}\" \
-                   < $libtoolize`"
-   ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`}
+#   ltfindcmd="`sed -n \"/=[^\\\`]/p;/libtool_m4=/{s/.*=/echo /p;q;}\" \
+#                   < $libtoolize`"
+#   ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`}
    # Expecting the code above to be very portable, but just in case...
    if [ -z "$ltfile" -o ! -f "$ltfile" ]; then
      ltpath=`dirname $libtoolize`
@@ -181,12 +183,6 @@
 ${AUTOHEADER:-autoheader}
 
 echo "Creating configure ..."
-### do some work to toss config.cache?
-${AUTOCONF:-autoconf}
-
-# Remove autoconf 2.5x's cache directory
-rm -rf autom4te*.cache
-
 # fix for FreeBSD (at least):
 # libtool.m4 is in share/aclocal, while e.g. aclocal19 only looks in share/aclocal19
 # get aclocal's default directory and include the libtool.m4 directory via -I if
@@ -197,7 +193,14 @@
 if [ -n "${aclocal_dir}" -a -n "${ltfile}" -a "`dirname ${ltfile}`" != "${aclocal_dir}" ] ; then
   ACLOCAL_OPTS="-I `dirname ${ltfile}`"
 fi
+${ACLOCAL:-aclocal}
 
+### do some work to toss config.cache?
+${AUTOCONF:-autoconf}
+
+# Remove autoconf 2.5x's cache directory
+rm -rf autom4te*.cache
+
 echo "Entering directory ${LIBDIR}/apr-util"
 cd ${LIBDIR}/apr-util
 ./buildconf
Index: libs/apr/configure.in
===================================================================
--- libs/apr/configure.in	(revision 9850)
+++ libs/apr/configure.in	(working copy)
@@ -200,8 +200,8 @@
 
 if test "x$use_libtool" = "xyes"; then
       lt_compile='$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -o $@ -c $< && touch $@'
-      LT_VERSION="-version-info `$get_version libtool $version_hdr APR`"
-      link="\$(LIBTOOL) \$(LTFLAGS) --mode=link \$(LT_LDFLAGS) \$(COMPILE) ${LT_VERSION} \$(ALL_LDFLAGS) -o \$@"
+      lt_version="-version-info `$get_version libtool $version_hdr APR`"
+      link="\$(LIBTOOL) \$(LTFLAGS) --mode=link \$(LT_LDFLAGS) \$(COMPILE) ${lt_version} \$(ALL_LDFLAGS) -o \$@"
       so_ext='lo'
       lib_target='-rpath $(libdir) $(OBJECTS)'
       export_lib_target='-rpath \$(libdir) \$(OBJECTS)'
Index: libs/apr-util/xml/expat/buildconf.sh
===================================================================
--- libs/apr-util/xml/expat/buildconf.sh	(revision 9850)
+++ libs/apr-util/xml/expat/buildconf.sh	(working copy)
@@ -58,6 +58,8 @@
 ${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"
 
 echo "Creating configure ..."
+${AUTOCONF:-aclocal}
+
 ### do some work to toss config.cache?
 ${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"
 
Index: libs/spandsp/config-h.in
===================================================================
--- libs/spandsp/config-h.in	(revision 9850)
+++ libs/spandsp/config-h.in	(working copy)
@@ -221,6 +221,10 @@
 /* Define to 1 if you have the <X11/X.h> header file. */
 #undef HAVE_X11_X_H
 
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
 /* Name of package */
 #undef PACKAGE
 
Index: libs/libsndfile/configure.ac
===================================================================
--- libs/libsndfile/configure.ac	(revision 9850)
+++ libs/libsndfile/configure.ac	(working copy)
@@ -32,6 +32,7 @@
 
 AC_PROG_CC
 AM_PROG_CC_C_O
+AC_PROG_CXX
 AM_PROG_LIBTOOL
 
 AC_CHECK_PROG(autogen, autogen, yes, no)
Index: build/modmake.rules.in
===================================================================
--- build/modmake.rules.in	(revision 9850)
+++ build/modmake.rules.in	(working copy)
@@ -29,7 +29,8 @@
 DYLD_LIBRARY_PATH=@libdir@:$DYLD_LIBRARY_PATH
 LD_LIBRARY_PATH=@libdir@:$LD_LIBRARY_PATH
 OSARCH=`uname -s`
-DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@
+DYNAMIC_LIB_EXTEN = la
+#DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@
 SOLINK = @SOLINK@
 
 LDFLAGS=@SWITCH_AM_LDFLAGS@ @LDFLAGS@ $(OUR_LDFLAGS)
@@ -39,11 +40,11 @@
 
 COMPILE      = $(CC) $(ALL_CFLAGS) $(DEFS)
 LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(COMPILE)
-LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(ALL_CFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(ALL_CFLAGS) $(LDFLAGS) -module -avoid-version -rpath $(MODINSTDIR) -o $@
 
 CXXCOMPILE = $(CXX) $(ALL_CXXFLAGS) $(DEFS)
 LTCXXCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CXXCOMPILE)
-CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@
+CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(ALL_CXXFLAGS) $(LDFLAGS) -module -avoid-version -rpath $(MODINSTDIR) -o $@
 
 CSOURCEFILE=$(MODNAME).c
 CXXSOURCEFILE=$(MODNAME).cpp
