menu "Configuration"
depends on PACKAGE_freeswitch
+ choice
+ prompt "Version to use"
+ default FS_WITH_VERSION_RELEASE
+ help
+ Specify version to use: [devel|release]
+
+ config FS_WITH_VERSION_DEVEL
+ bool "devel"
+ help
+ Selected version: devel
+
+ config FS_WITH_VERSION_RELEASE
+ bool "release"
+ help
+ Selected version: release
+
+ endchoice
+
choice
depends on DEVEL
prompt "Git HEAD version to use"
help
Use OpenSSL crypto primitives.
+ config FS_WITH_PYTHON
+ depends on PACKAGE_freeswitch-mod-python
+ bool "Enable to use system provided version of python"
+ default n
+ help
+ Enable to use system provided version of python.
+
config FS_WITH_STUN
bool "Enable stun module"
default n
help
- Enable stun module
+ Enable stun module.
config FS_WITH_ERLANG
depends on PACKAGE_freeswitch-mod-erlang-event
PKG_NAME:=freeswitch
PKG_SOURCE_PROTO:=git
PKG_DISTNAME:=$(PKG_NAME)_$(PKG_SOURCE_PROTO)
-PKG_VERSION:=1.5.15b
+PKG_VERSION:=1.5.14
#
# The latest FS git hash in PKG_SOURCE_VERSION can be obtained from
# http://fisheye.freeswitch.org
#
-FS_WITH_DEFAULT_HEAD:=12b6940644a68ea444c0e430412d419ae368d4a8
+FS_WITH_DEFAULT_HEAD:=6eb59c711989774fb797d1c447e3d63aac84826b
PKG_SOURCE_URL:=https://stash.$(PKG_NAME).org/scm/fs/$(PKG_NAME).git
PKG_SOURCE_VERSION:=$(if $(CONFIG_FS_WITH_LATEST_HEAD),$(shell git ls-remote $(PKG_SOURCE_URL) HEAD|cut -f1),$(FS_WITH_DEFAULT_HEAD))
FS_WITH_DEFAULT_HEAD_SHORT:=$(shell echo $(FS_WITH_DEFAULT_HEAD)|cut -b -7)
CONFIG_FS_WITH_OPENWRT_SOURCE \
CONFIG_FS_WITH_OPT \
CONFIG_FS_WITH_POSTGRESQL \
+ CONFIG_FS_WITH_PYTHON \
CONFIG_FS_WITH_SILENT_RULES \
CONFIG_FS_WITH_SQLITE3 \
CONFIG_FS_WITH_SRTP \
$(call Package/$(PKG_NAME)/Default)
MENU:=1
TITLE:=FreeSWITCH open source telephony platform ($(PKG_SOURCE_VERSION_SHORT))
- DEPENDS:=+FS_WITH_CORE_LIBEDIT_SUPPORT:libedit +FS_WITH_OPENSSL:libopenssl +libcurl +libdb47 +libgdbm $(ICONV_DEPENDS) $(INTL_DEPENDS) +libjpeg +libncurses +libopenldap +libpcre +libpthread +librt +libspeex +libspeexdsp +FS_WITH_SQLITE3:libsqlite3 +FS_WITH_SRTP:libsrtp +SSP_SUPPORT:libssp +libstdcpp +libuuid +PACKAGE_$(PKG_NAME)-mod-perl:perl
+ DEPENDS:=+FS_WITH_CORE_LIBEDIT_SUPPORT:libedit +FS_WITH_OPENSSL:libopenssl +libcurl +libdb47 +libgdbm $(ICONV_DEPENDS) $(INTL_DEPENDS) +libjpeg +libncurses +libopenldap +libpcre +libpthread +librt +libspeex +libspeexdsp +FS_WITH_SQLITE3:libsqlite3 +FS_WITH_SRTP:libsrtp_git +SSP_SUPPORT:libssp +libstdcpp +libuuid +PACKAGE_$(PKG_NAME)-mod-perl:perl
endef
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-flite),)
- $(eval $(call Download/files,flite,flite-1.5.4-current.tar.bz2,f3a2d88b1059f6f4ff3c20a8169bc0f4,,downloads/libs/,libs/))
+ $(eval $(call Download/files,flite,flite-2.0.0-release.tar.bz2,645db96ffc296cbb6d37f231cc1cc6b2,,downloads/libs/,libs/))
endif
$(if $(CONFIG_FS_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)/usr/lib") \
$(if $(CONFIG_FS_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \
$(if $(CONFIG_FS_WITH_OGG),--with-ogg="$(STAGING_DIR)/usr") \
+ $(if $(CONFIG_FS_WITH_OPENSSL),--with-openssl="pkg-config") \
$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),--with-ogg="$(STAGING_DIR)/usr",--without-ogg) \
$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-erlang-event),--with-erlang="$(CONFIG_FS_WITH_ERLANG)",--without-erlang) \
$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-java),--with-java="$(STAGING_DIR)/usr",--without-java) \
+ $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-python),--with-python="$(CONFIG_FS_WITH_PYTHON)",--without-python) \
$(if ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-curl)|$(CONFIG_PACKAGE_$(PKG_NAME)-mod-xml-cdr)|$(CONFIG_PACKAGE_$(PKG_NAME)-mod-xml-curl)),--with-libcurl="$(STAGING_DIR)/usr",--without-libcurl) \
--with$(if $(CONFIG_FS_WITH_MYSQL),,out)-mysql \
- --with$(if $(CONFIG_FS_WITH_OPENSSL),,out)-openssl \
--with$(if $(CONFIG_FS_WITH_POSTGRESQL),,out)-pgsql \
--with$(if $(CONFIG_FS_WITH_SQLITE3),,out)-sqlite3 \
$(CP) $(PKG_INSTALL_DIR)/usr/bin/fsxs $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/gentls_cert $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/tone2wav $(1)/usr/bin/
+ $(STAGING_DIR_HOST)/bin/sed -i -re 's|$(ICONV_LDFLAGS)||g;s|$(INTL_LDFLAGS)||g;s|$(PKG_BUILD_DIR)|/usr|g;s|$(STAGING_DIR)||g;s|$(STAGING_DIR_HOST)|/usr|g;s|$(TOOLCHAIN_DIR)||g;s|$(TARGET_CROSS)|usr|g;s|$(REAL_GNU_TARGET_NAME)|usr|g;:a;s|((-[IL]/\S+\s).*)[ ,\n]\1|\1|;ta' $(1)/usr/bin/fsxs
endef
$(eval $(call BuildPlugin,cdr-mongodb,MongoDB CDR logger,vanilla,,,,))
$(eval $(call BuildPlugin,cdr-pg-csv,PostgreSQL CDR Handler,vanilla,,,,+coreutils +FS_WITH_POSTGRESQL:libpq @FS_WITH_POSTGRESQL))
$(eval $(call BuildPlugin,cdr-sqlite,SQLite3 CDR Handler,vanilla,,,,@FS_WITH_SQLITE3))
-$(eval $(call BuildPlugin,celt,CELT Ultra-Low Delay Codec,vanilla,,,,+libogg))
+$(eval $(call BuildPlugin,celt,CELT Ultra-Low Delay Codec,vanilla,,,,+ogg_svn))
$(eval $(call BuildPlugin,cepstral,Cepstral Interface,vanilla,,,,@BROKEN)) # needs <swift.h>
$(eval $(call BuildPlugin,cidlookup,Data Query For CID->NAME Services,mod,,,,+libcurl)) # ~/conf
$(eval $(call BuildPlugin,cluechoo,Framework Demo,vanilla,,,,))
$(eval $(call BuildPlugin,nibblebill,Credit / Debit Billing,vanilla,,,,))
$(eval $(call BuildPlugin,opus,Opus CoDec,vanilla,,,,))
$(eval $(call BuildPlugin,oreka,Media Recording with Oreka,vanilla,,,,))
-$(eval $(call BuildPlugin,perl,Perl Language Interface,vanilla,,lib/perl5/5.20/$(PKG_NAME).la lib/perl5/5.20/$(PKG_NAME).pm lib/perl5/5.20/$(PKG_NAME).so,,+perl +libdb47 +libgdbm))
+$(eval $(call BuildPlugin,perl,Perl Language Interface,vanilla,,lib/perl5/5.20/$(PKG_NAME).la lib/perl5/5.20/$(PKG_NAME).pm lib/perl5/5.20/$(PKG_NAME).so,,+perl +libdb47 +libgdbm @ROKEN))
$(eval $(call BuildPlugin,portaudio,Portaudio To Sound Card Interface,vanilla,,,alsa,+FS_WITH_ALSA:alsa-lib @FS_WITH_ALSA @BROKEN)) # needs portaudio
$(eval $(call BuildPlugin,portaudio-stream,Portaudio Streaming Interface,vanilla,,,alsa,+FS_WITH_ALSA:alsa-lib @FS_WITH_ALSA @BROKEN)) # needs portaudio
$(eval $(call BuildPlugin,posix-timer,POSIX Compliant Soft Timer,vanilla,,,,))
$(eval $(call BuildPlugin,tts-commandline,ASR TTS Command Interface,vanilla,,,,))
$(eval $(call BuildPlugin,unimrcp,UniMRCP (MRCP Client),vanilla,,,,@BROKEN))
$(eval $(call BuildPlugin,valet-parking,Valet Parking Application,vanilla,,,,))
-$(eval $(call BuildPlugin,verto,HTML5 Verto interface,vanilla,,lib/perl5/5.20/MCAST.so lib/perl5/5.20/MCAST.la lib/perl5/5.20/MCAST.pm,perl rtc,))
+$(eval $(call BuildPlugin,verto,HTML5 Verto interface,vanilla,,lib/perl5/5.20/MCAST.so lib/perl5/5.20/MCAST.la lib/perl5/5.20/MCAST.pm,perl rtc,@BROKEN))
$(eval $(call BuildPlugin,vmd,VoiceMail Beep Detection,vanilla,,,,))
$(eval $(call BuildPlugin,voicemail,VoiceMail,vanilla,,,,))
$(eval $(call BuildPlugin,voicemail-ivr,VoiceMail IVR,vanilla,,,,))
--- /dev/null
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,3 +1,7 @@
++BASE=.
++
++include $(BASE)/build/openwrt_rules.mk
++
+ EXTRA_DIST =
+ SUBDIRS = . src build
+ AUTOMAKE_OPTIONS = foreign subdir-objects
+@@ -172,7 +176,6 @@ ZRTP_LIBS = -lbn -lzrtp
+ libfreeswitch_la_LDFLAGS += $(ZRTP_LDFLAGS)
+ libfreeswitch_la_LIBADD += $(ZRTP_LIBS)
+ CORE_LIBS += libs/libzrtp/libzrtp.a
+-LIBS += libs/libzrtp/third_party/bnlib/libbn.a
+ endif
+
+ library_includedir = $(includedir)
+@@ -311,7 +314,7 @@ endif
+ $(libfreeswitch_la_SOURCES): $(CORE_LIBS) $(switch_builddir)/modules.conf
+
+ src/include/switch_swigable_cpp.h: $(switch_srcdir)/src/include/switch_cpp.h
+- cat $(switch_srcdir)/src/include/switch_cpp.h | perl $(switch_srcdir)/build/strip.pl > $(switch_srcdir)/src/include/switch_swigable_cpp.h
++ cat $(switch_srcdir)/src/include/switch_cpp.h | $(STAGING_DIR)/../host/usr/bin/perl $(switch_srcdir)/build/strip.pl > $(switch_srcdir)/src/include/switch_swigable_cpp.h
+ # $(CC) -E $(switch_srcdir)/src/include/switch_cpp.h \
+ # -I$(switch_srcdir)/src/include -I$(switch_srcdir)/libs/libteletone/src \
+ # -DSWITCH_DECLARE_CLASS= -DSWITCH_DECLARE\(x\)=x -DSWITCH_DECLARE_CONSTRUCTOR= \
+@@ -374,7 +377,7 @@ fs_ivrd_LDFLAGS = $(AM_LDFLAGS) -lpthrea
+ nodist_freeswitch_SOURCES = src/include/switch_version.h
+ freeswitch_SOURCES = src/switch.c
+ freeswitch_CFLAGS = $(AM_CFLAGS) $(CORE_CFLAGS)
+-freeswitch_LDFLAGS = $(AM_LDFLAGS) -lpthread -rpath $(libdir)
++freeswitch_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) -lpthread
+ freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la
+
+ if HAVE_ODBC
+@@ -633,7 +636,9 @@ sndfile-reconf:
+
+ tiff-reconf:
+ cd libs/tiff-4.0.2 && autoreconf -fi
+- cd libs/tiff-4.0.2 && sh ./configure.gnu $(MY_DEFAULT_ARGS)
++ cd libs/tiff-4.0.2 && sh ./configure.gnu $(MY_DEFAULT_ARGS) --host="$(GNU_TARGET_NAME)" --prefix="/usr"
++ cd libs/spandsp && autoreconf -fi
++ cd libs/spandsp && sh ./configure.gnu $(MY_DEFAULT_ARGS) --host="$(GNU_TARGET_NAME)" --prefix="/usr"
+ cd libs/tiff-4.0.2 && make
+
+ python-reconf:
+@@ -658,9 +663,6 @@ iks-reconf:
+ $(MAKE) mod_dingaling-clean
+
+ spandsp-reconf: tiff-reconf
+- cd libs/spandsp && $(MAKE) clean || echo
+- cd libs/spandsp && autoreconf -fi
+- cd libs/spandsp && sh ./configure.gnu $(MY_DEFAULT_ARGS)
+ cd libs/spandsp && $(MAKE)
+
+ sofia-reconf:
--- /dev/null
+--- a/build/config/erlang.m4
++++ b/build/config/erlang.m4
+@@ -1,6 +1,6 @@
+ AC_DEFUN([CHECK_ERLANG], [
+ #
+-# Erlang checks for mod_erlang_event
++# Erlang check
+ #
+ AC_ARG_WITH(
+ [erlang],
+@@ -19,22 +19,23 @@ then
+ if test ! -x "$with_erlang" ; then
+ AC_MSG_ERROR([Specified erlang does not exist or is not executable: $with_erlang])
+ fi
+- AC_MSG_RESULT([$with_erlang])
+- AC_SUBST([ERLANG], ["$with_erlang"])
++ AC_MSG_RESULT(["$with_erlang/bin/erl"])
++ AC_SUBST([ERL],["$with_erlang/bin/erl"])
+ else
+- AC_PATH_PROG([ERLANG], ["erl"], ["no"], ["$PATH:/usr/bin:/usr/local/bin"])
++ AC_ERLANG_NEED_ERL(["$with_erlang/bin"])
+ fi
+
+- if test "$ERLANG" != "no" ; then
++ if test "$ERL" != "no" ; then
+ AC_MSG_CHECKING([erlang version])
+- ERLANG_VER="`$ERLANG -version 2>&1 | cut -d' ' -f6`"
++ ERLANG_VER="`$ERL -version 2>&1 | cut -d' ' -f6`"
+
+ if test -z "$ERLANG_VER" ; then
+ AC_MSG_ERROR([Unable to detect erlang version])
++ else
++ AC_MSG_RESULT([$ERLANG_VER])
+ fi
+- AC_MSG_RESULT([$ERLANG_VER])
+
+- ERLANG_LIBDIR=`$ERLANG -noshell -eval 'io:format("~n~s/lib~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1`
++ ERLANG_LIBDIR=`$ERL -noshell -eval 'io:format("~n~s/lib~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1`
+ AC_MSG_CHECKING([erlang libdir])
+ if test -z "`echo $ERLANG_LIBDIR`" ; then
+ AC_MSG_ERROR([failed])
+@@ -42,9 +43,16 @@ then
+ ERLANG_LDFLAGS="-L$ERLANG_LIBDIR $ERLANG_LDFLAGS"
+ LIBS="-L$ERLANG_LIBDIR $LIBS"
+ fi
++
++ #
++ # Don't use the above ERLANG_LDFLAGS
++ #
++ ERLANG_LIBDIR="${STAGING_DIR}/usr/lib"
++ ERLANG_LDFLAGS="-L$ERLANG_LIBDIR"
++ LIBS="-L$ERLANG_LIBDIR $LIBS"
+ AC_MSG_RESULT([$ERLANG_LIBDIR])
+
+- ERLANG_INCDIR=`$ERLANG -noshell -eval 'io:format("~n~s/include~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1`
++ ERLANG_INCDIR=`$ERL -noshell -eval 'io:format("~n~s/include~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1`
+ AC_MSG_CHECKING([erlang incdir])
+ if test -z "`echo $ERLANG_INCDIR`" ; then
+ AC_MSG_ERROR([failed])
+@@ -58,10 +66,11 @@ then
+
+ ERLANG_LIB="ei"
+
+- # check liei
++ # check libei
+ AC_CHECK_LIB([$ERLANG_LIB], [ei_encode_version], [has_libei="yes"], [has_libei="no"])
+ # maybe someday ei will actually expose this?
+- AC_CHECK_LIB([$ERLANG_LIB], [ei_link_unlink], [ERLANG_CFLAGS="$ERLANG_CFLAGS -DEI_LINK_UNLINK"])
++ # until then, we comment it out
++ #AC_CHECK_LIB([$ERLANG_LIB], [ei_link_unlink], [ERLANG_CFLAGS="$ERLANG_CFLAGS -DEI_LINK_UNLINK"])
+
+ if test "$has_libei" = "no" ; then
+ AS_IF([test "$with_erlang" = "try"],
+@@ -75,7 +84,7 @@ then
+ )
+ else
+ ERLANG_LDFLAGS="$ERLANG_LDFLAGS -lei"
+- AC_MSG_NOTICE([Your erlang seems OK, do not forget to enable mod_erlang_event in modules.conf])
++ AC_MSG_NOTICE([Your erlang seems OK. You can now use ErLang in your codes.])
+ AC_SUBST([ERLANG_CFLAGS], [$ERLANG_CFLAGS])
+ AC_SUBST([ERLANG_LDFLAGS], [$ERLANG_LDFLAGS])
+ fi
+@@ -85,12 +94,12 @@ then
+
+ else
+ AS_IF([test "$with_erlang" = "try"],
+- [AC_MSG_WARN([Could not find erlang, mod_erlang_event will not build, use --with-erlang to specify the location])],
++ [AC_MSG_WARN([Could not find erlang, codes depend on erlang will not build, use --with-erlang to specify the location])],
+ [AC_MSG_ERROR([Could not find erlang, use --with-erlang to specify the location])]
+ )
+ fi
+ else
+- AC_MSG_WARN([erlang support disabled, building mod_erlang_event will fail!])
++ AC_MSG_WARN([erlang support disabled!])
+ fi
+
+ ])
--- /dev/null
+--- a/build/modules.conf.in
++++ b/build/modules.conf.in
+@@ -35,6 +35,7 @@ applications/mod_httapi
+ #applications/mod_rad_auth
+ #applications/mod_redis
+ #applications/mod_rss
++#applications/mod_skel
+ #applications/mod_sonar
+ applications/mod_sms
+ #applications/mod_snapshot
--- /dev/null
+--- /dev/null
++++ b/build/openwrt_rules.mk
+@@ -0,0 +1,7 @@
++OPENWRT_DIR=$(shell (cd $(BASE)/../../..;pwd))
++STAGING_PREFIX=$(OPENWRT_DIR)/staging_dir/host
++STAGING_DIR=$(OPENWRT_DIR)/staging_dir/$(shell (cd $(BASE)/..;basename `pwd`))
++ARCH="$(shell grep CONFIG_ARCH $(OPENWRT_DIR)/.config|cut -d= -d'"' -f2)"
++GNU_TARGET_NAME=$(ARCH)-openwrt-linux
++
++include $(OPENWRT_DIR)/rules.mk
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -229,13 +229,16 @@ AX_COMPILER_VENDOR
+ if test "x${cross_compiling}" = "xyes"; then
+ CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
+ case "$host" in
+- arm*-linux-gnueabi*|arm*-*-linux-gnueabi*)
++ arm*-linux-gnueabi*|arm*-*-linux-*)
+ # spandsp modem
+ ac_cv_file__dev_ptmx=yes
+ # libjs
+ export ac_cv_va_copy=yes
++ # sofia-sip
++ export ac_cv_dev_urandom=yes
+ # srtp
+ export ac_cv_file__dev_urandom=yes
++ export ac_cv_file___dev_urandom_=yes
+ # rpl_malloc
+ export ac_cv_func_realloc_0_nonnull=yes
+ export ac_cv_func_malloc_0_nonnull=yes
+@@ -248,7 +251,7 @@ if test "x${cross_compiling}" = "xyes";
+ export apr_cv_mutex_recursive=yes
+ export ac_cv_func_pthread_rwlock_init=yes
+ export apr_cv_type_rwlock_t=yes
+- export apr_cv_process_shared_works=yes
++ export apr_cv_process_shared_works=no
+ export apr_cv_mutex_robust_shared=yes
+ ;;
+ esac
+@@ -379,9 +382,6 @@ elif test "x${ax_cv_c_compiler_vendor}"
+ elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
+ APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC)
+ APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC)
+- if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then
+- APR_ADDTO(SWITCH_AM_CFLAGS, -Werror)
+- fi
+ if test "${enable_64}" = "yes"; then
+ case "$host" in
+ *darwin*)
+@@ -861,7 +861,6 @@ AC_CHECK_LIB(pthread, pthread_setschedpa
+
+ AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket))
+
+-AC_CHECK_FILE(/dev/ptmx, [AC_DEFINE(HAVE_DEV_PTMX, 1, [Define if you have /dev/ptmx])])
+ AC_CHECK_LIB(util, openpty, [AC_DEFINE(HAVE_OPENPTY, 1, [Define if you have openpty()])])
+
+ AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[
+@@ -1177,14 +1176,14 @@ case $host in
+ ;;
+ esac
+
+-if ! (test -x "$PKG_CONFIG" || test -x "$(which pkg-config)"); then
+- AC_MSG_ERROR([You need to install pkg-config to configure FreeSWITCH.])
++if ! test -x "${STAGING_DIR}/../host/bin/pkg-config"; then
++ AC_MSG_ERROR([Missing tools/pkg-config package needed to configure FreeSWITCH.])
+ fi
+
+-# temporary workaround for Debian libldns-dev package bug
+-if test "$cross_compiling" != "yes" && test -f /usr/lib/pkg-config/libldns.pc; then
+- path_push_unique PKG_CONFIG_PATH /usr/lib/pkg-config
+-fi
++#
++# Workaround for OpenWRT pkg-config
++#
++path_push_unique PKG_CONFIG_PATH ${STAGING_DIR}/usr/lib/pkg-config
+
+ module_enabled() {
+ grep -v -e "\#" -e "^\$" modules.conf | sed -e "s|^.*/||" | grep "^${1}\$" >/dev/null
+@@ -1205,7 +1204,7 @@ PKG_CHECK_MODULES([LDNS], [libldns >= 1.
+ AC_CHECK_LIB([ldns], [ldns_str2rdf_a], [LDNS_LIBS=-lldns])
+ AS_IF([test -z "$LDNS_LIBS"],[
+ if module_enabled mod_enum; then
+- AC_MSG_ERROR([You need to either install libldns-dev or disable mod_enum in modules.conf])
++ AC_MSG_ERROR([You need to either install libldns or disable mod_enum in modules.conf])
+ else
+ AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_LDNS],[false])
+ fi],[
+@@ -1287,18 +1286,18 @@ AM_CONDITIONAL([HAVE_MYSQL],[test "$foun
+ # perl checks
+ #
+
+-AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl=yes],[ac_cv_have_perl=no])
+-
+-# -a "x$ac_cv_have_EXTERN_h" != "xno"
++AC_CHECK_PROG([PERL],[perl],[ac_cv_have_perl=yes],[ac_cv_have_perl=no],[${STAGING_DIR}/../host/usr/bin])
++PERL=$as_dir/$ac_word$ac_exec_ext
+
+ if test "x$ac_cv_have_perl" != "xno"; then
+- PERL=perl
+- PERL_SITEDIR="`$PERL -MConfig -e 'print $Config{archlib}'`"
+- PERL_LIBDIR="-L`$PERL -MConfig -e 'print $Config{archlib}'`/CORE"
+- PERL_LIBS="`$PERL -MConfig -e 'print $Config{libs}'`"
+- PERL_CFLAGS="-w -DMULTIPLICITY `$PERL -MExtUtils::Embed -e ccopts | sed -e 's|-arch x86_64 -arch i386||'` -DEMBED_PERL"
+- PERL_LDFLAGS="`$PERL -MExtUtils::Embed -e ldopts| sed -e 's|-arch x86_64 -arch i386||'`"
+- PERL_INC="`$PERL -MExtUtils::Embed -e perl_inc`"
++ PERL_SITELIB="/usr/lib/perl5/5.20"
++ PERL_SITEDIR="${STAGING_DIR}${PERL_SITELIB}"
++ PERL_COREDIR="${PERL_SITEDIR}/CORE"
++ PERL_INC="-I${PERL_COREDIR}"
++ PERL_CFLAGS="-w -DMULTIPLICITY -fwrapv -fno-strict-aliasing -pipe -fstack-protector ${PERL_INC} -DEMBED_PERL"
++ PERL_LIBDIR="-L${PERL_COREDIR}"
++ PERL_LIBS="-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc "
++ PERL_LDFLAGS="${LDFLAGS} -lpthread ${PERL_LIBS}"
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$PERL_CFLAGS"
+@@ -1311,12 +1310,15 @@ if test "x$ac_cv_have_perl" != "xno"; th
+ AC_CHECK_LIB([perl], [perl_alloc], ac_cv_use_libperl=yes, ac_cv_use_libperl=no)
+ LDFLAGS="$save_LDFLAGS"
+
+- AC_SUBST(PERL_SITEDIR)
+- AC_SUBST(PERL_LIBDIR)
+- AC_SUBST(PERL_LIBS)
++ AC_SUBST(PERL)
+ AC_SUBST(PERL_CFLAGS)
+- AC_SUBST(PERL_LDFLAGS)
++ AC_SUBST(PERL_COREDIR)
+ AC_SUBST(PERL_INC)
++ AC_SUBST(PERL_LDFLAGS)
++ AC_SUBST(PERL_LIBDIR)
++ AC_SUBST(PERL_LIBS)
++ AC_SUBST(PERL_SITEDIR)
++ AC_SUBST(PERL_SITELIB)
+ fi
+
+ AM_CONDITIONAL([HAVE_PERL],[test "x$ac_cv_have_perl" != "xno" -a "x$ac_cv_have_EXTERN_h" != "xno" -a "x$ac_cv_use_libperl" != "xno"])
+@@ -1325,17 +1327,19 @@ AM_CONDITIONAL([HAVE_PERL],[test "x$ac_c
+ # php checks
+ #
+
+-AC_CHECK_PROG(PHP,php,[ac_cv_have_php=yes],[ac_cv_have_php=no])
+-AC_CHECK_PROG(PHP_CONFIG,php-config,[ac_cv_have_php_config=yes],[ac_cv_have_php_config=no])
++AC_CHECK_PROG([PHP],[php],[ac_cv_have_php=yes],[ac_cv_have_php=no],[${STAGING_DIR}/../host/usr/bin:/usr/bin])
++PHP=$as_dir/$ac_word$ac_exec_ext
++
++AC_CHECK_PROG([PHP_CONFIG],[php-config],[ac_cv_have_php_config=yes],[ac_cv_have_php_config=no],[${STAGING_DIR}/../host/usr/bin])
++PHP_CONFIG=$as_dir/$ac_word$ac_exec_ext
++
+ AM_CONDITIONAL([HAVE_PHP],[test "x$ac_cv_have_php" != "xno" -a "x$ac_cv_have_php_config" != "xno"])
+
+ if test "x$ac_cv_have_php" != "xno" -a "x$ac_cv_have_php_config" != "xno"; then
+- PHP=php
+- PHP_CONFIG=php-config
+ PHP_LDFLAGS="`$PHP_CONFIG --ldflags`"
+- PHP_LIBS="`$PHP_CONFIG --libs | sed -r 's/ ?-l(bz2|pcre|xml2|gssapi_krb5|krb5|k5crypto|com_err|history|z|readline|gmp|ssl|crypto)//g'`"
++ PHP_LIBS="`$PHP_CONFIG --libs | sed -r 's/ ?-l(bz2|pcre|xml2|gssapi_krb5|krb5|k5crypto|com_err|history|z|readline|gmp|ssl|crypt(o|))//g;s/^/-lcrypto/g'`"
+ PHP_EXT_DIR="`$PHP_CONFIG --extension-dir`"
+- PHP_INC_DIR="`$PHP -r 'echo ini_get("include_path");' | cut -d: -f2`"
++ PHP_INC_DIR="`$PHP_CONFIG --include-dir`"
+ PHP_INI_DIR="`$PHP_CONFIG --configure-options | tr " " "\n" | grep -- --with-config-file-scan-dir | cut -f2 -d=`"
+ PHP_CFLAGS="`$PHP_CONFIG --includes`"
+ AC_SUBST(PHP_LDFLAGS)
+@@ -1443,6 +1447,7 @@ then
+ AC_MSG_NOTICE([Your python seems OK, do not forget to enable mod_python in modules.conf])
+ AC_SUBST([PYTHON_CFLAGS], [$PYTHON_CFLAGS])
+ AC_SUBST([PYTHON_LDFLAGS], [$PYTHON_LDFLAGS])
++ AC_SUBST([PYTHON_LIB], [$PYTHON_LIB])
+ fi
+ else
+ AS_IF([test "$with_python" = "try"],
--- /dev/null
+--- a/libs/libzrtp/include/zrtp_config.h
++++ b/libs/libzrtp/include/zrtp_config.h
+@@ -68,8 +68,16 @@
+ * If the byte order is not specified manually in zrtp_config_user.h - try to detect it automatically
+ */
+ #if !defined(ZRTP_BYTE_ORDER)
++#if defined(linux) || defined(__linux)
+
+-#if defined(_i386_) || defined(i_386_) || defined(_X86_) || defined(x86) || defined(__i386__) || \
++#include <endian.h>
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++#define ZRTP_BYTE_ORDER ZBO_LITTLE_ENDIAN
++#elif __BYTE_ORDER == __BIG_ENDIAN
++#define ZRTP_BYTE_ORDER ZBO_BIG_ENDIAN
++#endif
++
++#elif defined(_i386_) || defined(i_386_) || defined(_X86_) || defined(x86) || defined(__i386__) || \
+ defined(__i386) || defined(_M_IX86) || defined(__I86__)
+ /*
+ * Generic i386 processor family, little-endian
--- /dev/null
+--- a/libs/sofia-sip/configure.gnu
++++ b/libs/sofia-sip/configure.gnu
+@@ -1,4 +1,4 @@
+ #! /bin/sh
+ srcpath=$(dirname $0 2>/dev/null ) || srcpath="."
+-$srcpath/configure "$@" --with-pic --with-glib=no --disable-shared --without-doxygen --disable-stun
++$srcpath/configure "$@" --with-pic --with-glib=no --disable-shared --without-doxygen
+
--- /dev/null
+--- a/libs/spandsp/src/spandsp/fast_convert.h
++++ b/libs/spandsp/src/spandsp/fast_convert.h
+@@ -195,7 +195,7 @@ extern "C"
+ {
+ return (long int) (x);
+ }
+-#elif defined(__ppc__) || defined(__powerpc__)
++#elif 0 /* defined(__ppc__) || defined(__powerpc__) */
+ static __inline__ long int lfastrint(register double x)
+ {
+ int res[2];
--- /dev/null
+--- a/libs/spandsp/src/t4_rx.c
++++ b/libs/spandsp/src/t4_rx.c
+@@ -50,7 +50,7 @@
+ #include "spandsp/stdbool.h"
+ #endif
+ #include "floating_fudge.h"
+-#include <tiffio.h>
++#include <tiffiop.h>
+
+ #include "spandsp/telephony.h"
+ #include "spandsp/alloc.h"
--- /dev/null
+--- a/libs/spandsp/src/t4_tx.c
++++ b/libs/spandsp/src/t4_tx.c
+@@ -50,7 +50,7 @@
+ #include "spandsp/stdbool.h"
+ #endif
+ #include "floating_fudge.h"
+-#include <tiffio.h>
++#include <tiffiop.h>
+
+ #include "spandsp/telephony.h"
+ #include "spandsp/alloc.h"
--- /dev/null
+--- a/libs/srtp/configure.ac
++++ b/libs/srtp/configure.ac
+@@ -130,9 +130,12 @@ if test "$enable_kernel_linux" = "yes";
+ fi
+ AC_MSG_RESULT($enable_kernel_linux)
+
+-dnl Check for /dev/urandom
+-AC_CHECK_FILE(/dev/urandom, DEV_URANDOM=/dev/urandom,
+- [AC_CHECK_FILE(/dev/random, DEV_URANDOM=/dev/random)])
++
++dnl Check for /dev/urandom ONLY when NOT cross compiling
++if test "$cross_compiling" != yes; then
++ AC_CHECK_FILE(/dev/urandom, DEV_URANDOM=/dev/urandom,
++ [AC_CHECK_FILE(/dev/random, DEV_URANDOM=/dev/random)])
++fi
+
+ dnl Checks for header files.
+ AC_HEADER_STDC
--- /dev/null
+--- a/libs/xmlrpc-c/config.mk.in
++++ b/libs/xmlrpc-c/config.mk.in
+@@ -335,8 +335,8 @@ endif
+ # The cross compiling user can update config.mk or override
+ # BUILDTOOL_CC on a make command.
+
+-BUILDTOOL_CC = $(CC)
+-BUILDTOOL_CCLD = $(CCLD)
++BUILDTOOL_CC = $(HOSTCC)
++BUILDTOOL_CCLD = $(HOSTCC)
+
+ # Here are the commands 'make install' uses to install various kinds of files:
+
--- /dev/null
+--- a/libs/xmlrpc-c/lib/expat/gennmtab/Makefile
++++ b/libs/xmlrpc-c/lib/expat/gennmtab/Makefile
+@@ -1,3 +1,5 @@
++TOPDIR=$(shell (cd $(SRCDIR)/../../../../..; pwd))
++
+ ifeq ($(SRCDIR),)
+ updir = $(shell echo $(dir $(1)) | sed 's/.$$//')
+ EXPATDIR := $(call updir,$(CURDIR))
+@@ -7,6 +9,7 @@ ifeq ($(SRCDIR),)
+ endif
+ SUBDIR := lib/expat/gennmtab
+
++include $(TOPDIR)/rules.mk
+ include $(BLDDIR)/config.mk
+
+ LDFLAGS = $(LADD)
--- /dev/null
+--- a/src/mod/endpoints/mod_gsmopen/gsmlib/gsmlib-1.10-patched-13ubuntu/configure.in
++++ b/src/mod/endpoints/mod_gsmopen/gsmlib/gsmlib-1.10-patched-13ubuntu/configure.in
+@@ -56,21 +56,6 @@ dnl Checks for programs.
+ AC_PROG_CPP
+ AC_PROG_CXX
+
+-dnl check for gcc 2.95.x
+-AC_TRY_RUN([
+-#include <unistd.h>
+-main()
+-{
+-#if defined(__GNUC__) && \
+- ! (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
+- return 1;
+-#endif
+- return 0;
+-}
+-],,
+-[echo "need at least gcc 2.95 to compile correctly"
+-exit 1])
+-
+ dnl check for alloca
+ AC_FUNC_ALLOCA
+
--- /dev/null
+--- a/libs/libcodec2/src/Makefile.am
++++ b/libs/libcodec2/src/Makefile.am
+@@ -88,6 +88,12 @@ codebookge.$(OBJEXT): codebookge.c
+
+ codebook.lo: codebook.c
+
++generate_codebook:
++ $(CC_FOR_BUILD) -o generate_codebook generate_codebook.c -lm
++
++genlspdtcb:
++ $(CC_FOR_BUILD) -o genlspdtcb genlspdtcb.c -lm
++
+ codebook.c: generate_codebook $(CODEBOOKS)
+ ./generate_codebook lsp_cb $(CODEBOOKS) > codebook.c
+
--- /dev/null
+--- a/src/mod/codecs/mod_celt/Makefile.am
++++ b/src/mod/codecs/mod_celt/Makefile.am
+@@ -19,7 +19,7 @@ $(CELT_DIR):
+
+ $(CELT_BUILDDIR)/Makefile: $(CELT_DIR)
+ mkdir -p $(CELT_BUILDDIR)
+- cd $(CELT_BUILDDIR) && $(DEFAULT_VARS) $(CELT_DIR)/configure $(DEFAULT_ARGS) --disable-shared --with-pic --srcdir=$(CELT_DIR)
++ cd $(CELT_BUILDDIR) && $(DEFAULT_VARS) $(CELT_DIR)/configure $(DEFAULT_ARGS) --disable-shared --with-pic --srcdir=$(CELT_DIR) --with-ogg=$(STAGING_DIR)/usr
+ $(TOUCH_TARGET)
+
+ $(CELT_LA): $(CELT_BUILDDIR)/Makefile
--- /dev/null
+--- a/src/mod/codecs/mod_isac/typedefs.h
++++ b/src/mod/codecs/mod_isac/typedefs.h
+@@ -66,7 +66,7 @@
+ #define WEBRTC_ARCH_X86
+ #define WEBRTC_ARCH_32_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
+-#elif defined(__ARMEL__)
++#elif defined(__ARMEL__) || defined(__mips__)
+ // TODO(andrew): We'd prefer to control platform defines here, but this is
+ // currently provided by the Android makefiles. Commented to avoid duplicate
+ // definition warnings.
--- /dev/null
+--- a/src/mod/codecs/mod_opus/Makefile.am
++++ b/src/mod/codecs/mod_opus/Makefile.am
+@@ -19,7 +19,7 @@ $(OPUS_DIR)/configure:
+
+ $(OPUS_BUILDDIR)/Makefile: $(OPUS_DIR)/configure
+ mkdir -p $(OPUS_BUILDDIR)
+- cd $(OPUS_BUILDDIR) && $(DEFAULT_VARS) $(OPUS_DIR)/configure $(MY_DEFAULT_ARGS)
++ cd $(OPUS_BUILDDIR) && $(DEFAULT_VARS) $(OPUS_DIR)/configure $(MY_DEFAULT_ARGS) --host=$(host) --disable-shared --with-pic --srcdir=$(OPUS_DIR)
+ $(TOUCH_TARGET)
+
+ $(OPUS_LA): $(OPUS_BUILDDIR)/Makefile
--- /dev/null
+--- a/src/mod/directories/mod_ldap/Makefile.am
++++ b/src/mod/directories/mod_ldap/Makefile.am
+@@ -13,7 +13,7 @@ mod_ldap_la_CFLAGS = $(AM_CFLAGS) -DWI
+ mod_ldap_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(LDAPLA) $(LIBLBERLA)
+ mod_ldap_la_LDFLAGS = -avoid-version -module -no-undefined -shared
+
+-MY_DEFAULT_ARGS= --build=$(build) --host=$(host) --target=$(target) --prefix="$(prefix)" --exec_prefix="$(exec_prefix)" --libdir="$(libdir)" --disable-slapd --disable-bdb --disable-hdb
++MY_DEFAULT_ARGS= --build=$(build) --host=$(host) --target=$(target) --prefix="$(prefix)" --exec_prefix="$(exec_prefix)" --libdir="$(libdir)" --with-yielding_select=yes --disable-slapd --disable-bdb --disable-hdb
+
+ $(MODNAME).lo: $(LDAPLA) $(LIBLBERLA)
+
--- /dev/null
+--- a/src/mod/endpoints/mod_gsmopen/Makefile.am
++++ b/src/mod/endpoints/mod_gsmopen/Makefile.am
+@@ -12,7 +12,7 @@ SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libsp
+ mod_LTLIBRARIES = mod_gsmopen.la
+ mod_gsmopen_la_SOURCES = mod_gsmopen.cpp gsmopen_protocol.cpp
+ mod_gsmopen_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS)
+-mod_gsmopen_la_CPPFLAGS = -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I.
++mod_gsmopen_la_CPPFLAGS = -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I. -fpermissive
+ mod_gsmopen_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA) $(TIFF_LA)
+ mod_gsmopen_la_LDFLAGS = -avoid-version -module -no-undefined -lctb-0.16 -lgsmme
+
--- /dev/null
+--- a/src/mod/endpoints/mod_verto/Makefile.am
++++ b/src/mod/endpoints/mod_verto/Makefile.am
+@@ -9,19 +9,19 @@ mod_verto_la_LIBADD = $(switch_builddi
+ mod_verto_la_LDFLAGS = -avoid-version -module -no-undefined -shared
+
+ if HAVE_PERL
+-#perldir = $(PERL_SITEDIR)
+-noinst_LTLIBRARIES = MCAST.la
++perldir = "$(PERL_SITELIB)"
++perl_LTLIBRARIES = MCAST.la
+ MCAST_la_SOURCES = mcast/mcast_wrap.cpp mcast/perlxsi.c mcast/mcast.c mcast/mcast_cpp.cpp
+ MCAST_la_CFLAGS = $(CC_CFLAGS) $(CFLAGS) $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS)
+ MCAST_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS) $(CXXFLAGS) -w $(PERL_INC)
+ MCAST_la_CPPFLAGS = -I$(switch_srcdir)/src/mod/endpoints/mod_verto/mcast
+ MCAST_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(PERL_LDFLAGS)
+
+-#install-data-local: perlmod-install
++install-data-local: perlmod-install
+
+-#perlmod-install: install-perlLTLIBRARIES
+-# install -d -m 755 $(DESTDIR)$(PERL_SITEDIR)
+-# install -m 755 mcast/MCAST.pm $(DESTDIR)$(PERL_SITEDIR)
++perlmod-install: install-perlLTLIBRARIES
++ install -d -m 755 $(DESTDIR)$(perldir)
++ install -m 755 mcast/MCAST.pm $(DESTDIR)$(perldir)
+ endif
+
+ mcast/esl_wrap.cpp:
--- /dev/null
+--- a/src/mod/languages/mod_perl/Makefile.am
++++ b/src/mod/languages/mod_perl/Makefile.am
+@@ -1,22 +1,22 @@
+ include $(top_srcdir)/build/modmake.rulesam
+ MODNAME=mod_perl
+-PERL = perl
+-PERL_LIBDIR =-L`perl -MConfig -e 'print $$Config{archlib}'`/CORE
+-PERL_LIBS =`perl -MConfig -e 'print $$Config{libs}'`
+
+-perldir=$(prefix)/perl
++perldir="$(PERL_SITELIB)"
++
+ mod_LTLIBRARIES = mod_perl.la
+ perl_LTLIBRARIES = freeswitch.la
+ mod_perl_la_SOURCES = mod_perl.c freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c
+ mod_perl_la_CFLAGS = $(AM_CFLAGS)
+ mod_perl_la_CXXFLAGS = $(AM_CXXFLAGS)
+-mod_perl_la_CPPFLAGS = -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
++mod_perl_la_CPPFLAGS = ${PERL_CFLAGS} -I$(switch_srcdir)/libs/libteletone/src/
+ mod_perl_la_LIBADD = $(switch_builddir)/libfreeswitch.la
+-mod_perl_la_LDFLAGS = -avoid-version -module -no-undefined -shared `$(PERL) -MExtUtils::Embed -e ldopts` `$(PERL) -MConfig -e 'print $$Config{libs}'`
++#mod_perl_la_LDFLAGS = -avoid-version -module -no-undefined -shared `$(PERL) -MExtUtils::Embed -e ldopts` `$(PERL) -MConfig -e 'print $$Config{libs}'`
++mod_perl_la_LDFLAGS = -avoid-version -module -no-undefined -shared ${PERL_LDFLAGS}
+
+ freeswitch_la_SOURCES = freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c
+ freeswitch_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(LDFLAGS)
+-freeswitch_la_CPPFLAGS = -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
++freeswitch_la_CPPFLAGS = ${PERL_CFLAGS} -I$(switch_srcdir)/libs/libteletone/src/
++
+ reswig: swigclean mod_perl_wrap.cpp
+
+ swigclean: clean
--- /dev/null
+--- a/src/switch_rtp.c
++++ b/src/switch_rtp.c
+@@ -1535,7 +1535,7 @@ static void send_fir(switch_rtp_t *rtp_s
+ }
+ }
+
+-#ifdef ENABLE_SRTP
++#ifdef ENABLE_ZRTP
+ end:
+ #endif
+
+@@ -1630,7 +1630,7 @@ static void send_pli(switch_rtp_t *rtp_s
+ }
+ }
+
+-#ifdef ENABLE_SRTP
++#ifdef ENABLE_ZRTP
+ end:
+ #endif
+ return;