diff -Naupr freeswitch-1.0.6.orig/configure.in freeswitch-1.0.6/configure.in
--- freeswitch-1.0.6.orig/configure.in	2010-04-06 20:05:27.000000000 +0200
+++ freeswitch-1.0.6/configure.in	2011-08-08 18:13:08.251920144 +0200
@@ -16,7 +16,6 @@ AC_CONFIG_AUX_DIR(build/config)
 AM_INIT_AUTOMAKE(libfreeswitch,0.1)
 AC_CONFIG_SRCDIR([src/switch.c])
 AC_CONFIG_HEADER([src/include/switch_private.h])
-AC_CONFIG_HEADER([libs/xmlrpc-c/xmlrpc_amconfig.h])
 
 AC_PREFIX_DEFAULT(/usr/local/freeswitch)
 # AC_PREFIX_DEFAULT does not get expanded until too late so we need to do this to use prefix in this script
@@ -888,8 +887,6 @@ AC_CONFIG_FILES([Makefile
                 build/getlib.sh
 		build/freeswitch.pc
                 build/modmake.rules
-                libs/xmlrpc-c/include/xmlrpc-c/config.h
-                libs/xmlrpc-c/xmlrpc_config.h
                 scripts/gentls_cert])
 
 AM_CONDITIONAL(ISLINUX, [test `uname -s` = Linux])
diff -Naupr freeswitch-1.0.6.orig/Makefile.in freeswitch-1.0.6/Makefile.in
--- freeswitch-1.0.6.orig/Makefile.in	2010-04-06 20:07:42.000000000 +0200
+++ freeswitch-1.0.6/Makefile.in	2011-08-08 18:37:02.698157713 +0200
@@ -53,9 +53,6 @@ bin_PROGRAMS = freeswitch$(EXEEXT) fs_cl
 DIST_COMMON = README $(am__configure_deps) $(library_include_HEADERS) \
 	$(srcdir)/.version.in $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(top_srcdir)/configure \
-	$(top_srcdir)/libs/xmlrpc-c/include/xmlrpc-c/config.h.in \
-	$(top_srcdir)/libs/xmlrpc-c/xmlrpc_amconfig.h.in \
-	$(top_srcdir)/libs/xmlrpc-c/xmlrpc_config.h.in \
 	$(top_srcdir)/scripts/gentls_cert.in \
 	$(top_srcdir)/src/include/switch_am_config.h.in \
 	$(top_srcdir)/src/include/switch_private.h.in \
@@ -81,7 +78,6 @@ am__aclocal_m4_deps = $(top_srcdir)/acin
 	$(top_srcdir)/build/config/erlang.m4 \
 	$(top_srcdir)/build/config/odbc.m4 \
 	$(top_srcdir)/build/config/sched_setaffinity.m4 \
-	$(top_srcdir)/libs/apr/build/apr_common.m4 \
 	$(top_srcdir)/libs/sofia-sip/m4/sac-pkg-config.m4 \
 	$(top_srcdir)/libs/sofia-sip/m4/sac-openssl.m4 \
 	$(top_srcdir)/build/config/libcurl.m4 \
@@ -91,15 +87,12 @@ am__configure_deps = $(am__aclocal_m4_de
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno configure.status.lineno
 mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/src/include/switch_private.h \
-	$(top_builddir)/libs/xmlrpc-c/xmlrpc_amconfig.h
+CONFIG_HEADER = $(top_builddir)/src/include/switch_private.h
 CONFIG_CLEAN_FILES = src/include/switch_version.h.in .version \
 	src/mod/languages/mod_java/Makefile \
 	src/mod/languages/mod_python/Makefile \
 	src/mod/event_handlers/mod_erlang_event/Makefile \
 	src/include/switch_am_config.h \
-	libs/xmlrpc-c/include/xmlrpc-c/config.h \
-	libs/xmlrpc-c/xmlrpc_config.h scripts/gentls_cert
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -113,9 +106,8 @@ libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES)
 @HAVE_LIBEDIT_TRUE@am__DEPENDENCIES_1 =  \
 @HAVE_LIBEDIT_TRUE@	libs/libedit/src/.libs/libedit.a
-am__DEPENDENCIES_2 = libs/apr-util/libaprutil-1.la \
-	libs/apr/libapr-1.la libs/sqlite/libsqlite3.la \
-	libs/pcre/libpcre.la libs/speex/libspeex/libspeexdsp.la \
+am__DEPENDENCIES_2 = libs/sqlite/libsqlite3.la \
+	libs/speex/libspeex/libspeexdsp.la \
 	libs/srtp/libsrtp.la $(am__DEPENDENCIES_1)
 am__libfreeswitch_la_SOURCES_DIST = src/switch_apr.c \
 	src/switch_buffer.c src/switch_caller.c src/switch_channel.c \
@@ -213,7 +205,7 @@ am_freeswitch_OBJECTS = freeswitch-switc
 nodist_freeswitch_OBJECTS =
 freeswitch_OBJECTS = $(am_freeswitch_OBJECTS) \
 	$(nodist_freeswitch_OBJECTS)
-freeswitch_DEPENDENCIES = libfreeswitch.la libs/apr/libapr-1.la \
+freeswitch_DEPENDENCIES = libfreeswitch.la \
 	$(am__DEPENDENCIES_1)
 am_fs_cli_OBJECTS = fs_cli-esl.$(OBJEXT) fs_cli-esl_config.$(OBJEXT) \
 	fs_cli-esl_event.$(OBJEXT) fs_cli-esl_threadmutex.$(OBJEXT) \
@@ -228,7 +220,7 @@ fs_ivrd_OBJECTS = $(am_fs_ivrd_OBJECTS)
 fs_ivrd_LDADD = $(LDADD)
 binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
 SCRIPTS = $(bin_SCRIPTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include -I$(top_builddir)/libs/xmlrpc-c
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include
 depcomp = $(SHELL) $(top_srcdir)/build/config/depcomp
 am__depfiles_maybe = depfiles
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -486,17 +478,20 @@ AM_CFLAGS = $(SWITCH_AM_CFLAGS) $(SWITCH
 AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS)
 AM_LDFLAGS = $(SWITCH_AM_LDFLAGS)
 DEFAULT_SOUNDS = en-us-callie-8000
-CORE_CFLAGS = `$(switch_builddir)/libs/apr/apr-1-config --cflags \
-	--cppflags --includes` \
-	`$(switch_builddir)/libs/apr-util/apu-1-config --includes` \
+CORE_CFLAGS = `xmlrpc-c-config --cflags` \
+	`apr-1-config --cflags --cppflags --includes` \
+	`apu-1-config --includes` \
 	-I$(switch_srcdir)/libs/stfu -I$(switch_builddir)/libs/sqlite \
-	-I$(switch_srcdir)/libs/pcre \
+	`pcre-config --cflags` \
 	-I$(switch_srcdir)/libs/speex/include -Ilibs/speex/include \
 	-I$(switch_srcdir)/libs/srtp/include \
 	-I$(switch_srcdir)/libs/srtp/crypto/include \
 	-Ilibs/srtp/crypto/include $(am__append_1) $(am__append_2)
-CORE_LIBS = libs/apr-util/libaprutil-1.la libs/apr/libapr-1.la \
-	libs/sqlite/libsqlite3.la libs/pcre/libpcre.la \
+CORE_LIBS = `xmlrpc-c-config --libs` \
+	`apr-1-config --libs` \
+	`apu-1-config --libs` \
+	libs/sqlite/libsqlite3.la \
+	`pcre-config --libs` \
 	libs/speex/libspeex/libspeexdsp.la libs/srtp/libsrtp.la \
 	$(am__append_3)
 MOD_LINK = $(switch_srcdir)/libfreeswitch.la
@@ -593,7 +588,7 @@ nodist_freeswitch_SOURCES = src/include/
 freeswitch_SOURCES = src/switch.c
 freeswitch_CFLAGS = $(AM_CFLAGS) $(CORE_CFLAGS) $(am__append_8)
 freeswitch_LDFLAGS = $(AM_LDFLAGS) -lpthread -rpath $(libdir)
-freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la \
+freeswitch_LDADD = libfreeswitch.la -lapr \
 	$(am__append_9)
 bin_SCRIPTS = scripts/gentls_cert scripts/fsxs
 pkgconfigdir = $(libdir)/pkgconfig
@@ -651,18 +646,8 @@ $(top_srcdir)/src/include/switch_private
 	rm -f src/include/stamp-h1
 	touch $@
 
-libs/xmlrpc-c/xmlrpc_amconfig.h: libs/xmlrpc-c/stamp-h2
-	@if test ! -f $@; then \
-	  rm -f libs/xmlrpc-c/stamp-h2; \
-	  $(MAKE) libs/xmlrpc-c/stamp-h2; \
-	else :; fi
-
-libs/xmlrpc-c/stamp-h2: $(top_srcdir)/libs/xmlrpc-c/xmlrpc_amconfig.h.in $(top_builddir)/config.status
-	@rm -f libs/xmlrpc-c/stamp-h2
-	cd $(top_builddir) && $(SHELL) ./config.status libs/xmlrpc-c/xmlrpc_amconfig.h
-
 distclean-hdr:
-	-rm -f src/include/switch_private.h src/include/stamp-h1 libs/xmlrpc-c/xmlrpc_amconfig.h libs/xmlrpc-c/stamp-h2
+	-rm -f src/include/switch_private.h src/include/stamp-h1
 src/include/switch_version.h.in: $(top_builddir)/config.status $(top_srcdir)/src/include/switch_version.h.template
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 .version: $(top_builddir)/config.status $(srcdir)/.version.in
@@ -675,10 +660,6 @@ src/mod/event_handlers/mod_erlang_event/
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 src/include/switch_am_config.h: $(top_builddir)/config.status $(top_srcdir)/src/include/switch_am_config.h.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
-libs/xmlrpc-c/include/xmlrpc-c/config.h: $(top_builddir)/config.status $(top_srcdir)/libs/xmlrpc-c/include/xmlrpc-c/config.h.in
-	cd $(top_builddir) && $(SHELL) ./config.status $@
-libs/xmlrpc-c/xmlrpc_config.h: $(top_builddir)/config.status $(top_srcdir)/libs/xmlrpc-c/xmlrpc_config.h.in
-	cd $(top_builddir) && $(SHELL) ./config.status $@
 scripts/gentls_cert: $(top_builddir)/config.status $(top_srcdir)/scripts/gentls_cert.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@@ -1649,7 +1630,7 @@ distclean-tags:
 distdir: $(DISTFILES)
 	$(am__remove_distdir)
 	mkdir $(distdir)
-	$(mkdir_p) $(distdir)/. $(distdir)/build $(distdir)/build/config $(distdir)/libs/apr/build $(distdir)/libs/libteletone/src $(distdir)/libs/sofia-sip/m4 $(distdir)/libs/xmlrpc-c $(distdir)/libs/xmlrpc-c/include/xmlrpc-c $(distdir)/scripts $(distdir)/src/include $(distdir)/src/mod/event_handlers/mod_erlang_event $(distdir)/src/mod/languages/mod_java $(distdir)/src/mod/languages/mod_python
+	$(mkdir_p) $(distdir)/. $(distdir)/build $(distdir)/build/config $(distdir)/libs/libteletone/src $(distdir)/libs/sofia-sip/m4 $(distdir)/scripts $(distdir)/src/include $(distdir)/src/mod/event_handlers/mod_erlang_event $(distdir)/src/mod/languages/mod_java $(distdir)/src/mod/languages/mod_python
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
 	list='$(DISTFILES)'; for file in $$list; do \
@@ -2011,11 +1992,11 @@ scripts/fsxs: scripts/fsxs.in
 	    -e "s,@INSTALL\@,$(INSTALL)," \
 	    -e "s,@MKINSTALLDIRS\@,$(mkdir_p)," \
 	    \
-	    -e "s|@CFLAGS\@|$(CFLAGS) `./libs/apr/apr-1-config --cflags --cppflags`|" \
+	    -e "s|@CFLAGS\@|$(CFLAGS) `apr-1-config --cflags --cppflags`|" \
 	    -e "s|@INCLUDES\@|-I$(prefix)/include|" \
 	    -e "s|@SOLINK\@|$(SOLINK)|" \
 	    -e "s|@LDFLAGS\@|-L$(prefix)/lib|" \
-	    -e "s|@LIBS\@|`./libs/apr/apr-1-config --libs` `./libs/apr-util/apu-1-config --libs`|" \
+	    -e "s|@LIBS\@|`apr-1-config --libs` `apu-1-config --libs`|" \
 	    $(top_srcdir)/scripts/fsxs.in > scripts/fsxs
 
 $(switch_builddir)/modules.conf:
@@ -2064,14 +2045,6 @@ src/include/switch_version.h: src/includ
 libs/libedit/src/.libs/libedit.a:
 	cd libs/libedit && $(MAKE)
 
-libs/apr/libapr-1.la: libs/apr libs/apr/.update
-	@cd libs/apr && $(MAKE)
-	@$(TOUCH_TARGET)
-
-libs/apr-util/libaprutil-1.la: libs/apr-util libs/apr-util/.update libs/apr/libapr-1.la
-	@cd libs/apr-util && $(MAKE)
-	@$(TOUCH_TARGET)
-
 libs/speex/libspeex/libspeexdsp.la: libs/speex/.update
 	@cd libs/speex && $(MAKE)
 	@$(TOUCH_TARGET)
@@ -2080,10 +2053,6 @@ libs/sqlite/libsqlite3.la: libs/sqlite l
 	@cd libs/sqlite && $(MAKE) CFLAGS="$(SWITCH_AM_CFLAGS)"
 	@$(TOUCH_TARGET)
 
-libs/pcre/libpcre.la: libs/pcre libs/pcre/.update
-	@cd libs/pcre && $(MAKE)
-	@$(TOUCH_TARGET)
-
 libs/srtp/libsrtp.la: libs/srtp libs/srtp/.update
 	@cd libs/srtp && $(MAKE)
 	@$(TOUCH_TARGET)
diff -Naupr freeswitch-1.0.6.orig/rebootstrap.sh freeswitch-1.0.6/rebootstrap.sh
--- freeswitch-1.0.6.orig/rebootstrap.sh	2010-04-06 20:05:27.000000000 +0200
+++ freeswitch-1.0.6/rebootstrap.sh	2011-08-08 18:49:01.503757565 +0200
@@ -3,7 +3,7 @@ echo "bootstrap: checking installation..
 
 BASEDIR=`pwd`;
 LIBDIR=${BASEDIR}/libs;
-SUBDIRS="ilbc curl iksemel js js/nsprpub libdingaling libedit libsndfile pcre sofia-sip \
+SUBDIRS="ilbc iksemel js js/nsprpub libdingaling libedit libsndfile sofia-sip \
         speex sqlite srtp openzap spandsp libg722_1 portaudio unimrcp tiff-3.8.2 broadvoice silk";
 
 if [ ! -f modules.conf ]; then 
@@ -162,116 +162,6 @@ echo "  libtool   : ${libtool} (${lt_ver
 echo "  libtoolize: ${libtoolize}"
 echo
 
-echo "Entering directory ${LIBDIR}/apr"
-cd ${LIBDIR}/apr
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-# 
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-# bootstrap: Build the support scripts needed to compile from a
-#            checked-out version of the source code.
-
-# Create the libtool helper files
-#
-# Note: we copy (rather than link) them to simplify distribution.
-# Note: APR supplies its own config.guess and config.sub -- we do not
-#       rely on libtool's versions
-#
-echo "Copying libtool helper files ..."
-
-# Remove any libtool files so one can switch between libtool 1.3
-# and libtool 1.4 by simply rerunning the bootstrap script.
-(cd build ; rm -f ltconfig ltmain.sh libtool.m4)
-
-if ${libtoolize} -n --install >/dev/null 2>&1 ; then
-  $libtoolize --force --copy --install
-else
-  $libtoolize --force --copy
-fi
-
-if [ -f libtool.m4 ]; then 
-   ltfile=`pwd`/libtool.m4
-else
-   if [ $lt_major -eq 2 ]; then
-       ltfindcmd="`sed -n \"/aclocaldir=/{s/.*=/echo /p;q;}\" < $libtoolize`"
-       ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`/libtool.m4}
-   else
-       ltfindcmd="`sed -n \"/=[^\\\`]/p;/libtool_m4=/{s/.*=/echo /p;q;}\" \
-                     < $libtoolize`"
-       ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`}
-   fi
-   # Expecting the code above to be very portable, but just in case...
-   if [ -z "$ltfile" -o ! -f "$ltfile" ]; then
-     ltpath=`dirname $libtoolize`
-     ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4
-   fi
-fi
-
-if [ ! -f $ltfile ]; then
-    echo "$ltfile not found"
-    exit 1
-fi
-
-echo "bootstrap: Using libtool.m4 at ${ltfile}."
-
-cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4
-
-# libtool.m4 from 1.6 requires ltsugar.m4
-if [ -f ltsugar.m4 ]; then
-   rm -f build/ltsugar.m4
-   mv ltsugar.m4 build/ltsugar.m4
-fi
-
-# Clean up any leftovers
-rm -f aclocal.m4 libtool.m4
-
-# 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
-# it's in a different location
-
-aclocal_dir="`${ACLOCAL:-aclocal} --print-ac-dir`"
-
-if [ -n "${aclocal_dir}" -a -n "${ltfile}" -a "`dirname ${ltfile}`" != "${aclocal_dir}" ] ; then
-  ACLOCAL_OPTS="-I `dirname ${ltfile}`"
-fi
-
-### run aclocal
-echo "Re-creating aclocal.m4 ..."
-${ACLOCAL:-aclocal} ${ACLOCAL_OPTS}
-
-### do some work to toss config.cache?
-echo "Creating configure ..."
-${AUTOCONF:-autoconf}
-
-#
-# Generate the autoconf header
-#
-echo "Creating include/arch/unix/apr_private.h.in ..."
-${AUTOHEADER:-autoheader}
-
-
-# Remove autoconf 2.5x's cache directory
-rm -rf autom4te*.cache
-
-echo "Entering directory ${LIBDIR}/apr-util"
-cd ${LIBDIR}/apr-util
-./buildconf
-
 for i in ${SUBDIRS}
 do
   echo "Entering directory ${LIBDIR}/${i}"
