freeswitch: move to packages-abandoned repository

Signed-off-by: Jiri Slachta <jiri@slachta.eu>
This commit is contained in:
Jiri Slachta 2019-06-16 12:53:51 +02:00
parent fdd274e1df
commit 6381da204b
48 changed files with 0 additions and 3019 deletions

View file

@ -1,264 +0,0 @@
menu "Configuration"
depends on PACKAGE_freeswitch
choice
depends on DEVEL
prompt "Git HEAD version to use"
default FS_WITH_DEFAULT_HEAD
help
The existing git HEAD is probably outdated. This option allows
OpenWRT to pull the latest git HEAD. Please ONLY enable this
option if you know what you are doing. It may and/or may not
be cleanly compiled and may require some intervension to create
new patches. If you take this route and come up with some patches,
please contemplate to contribute
or send in your patches.
config FS_WITH_DEFAULT_HEAD
bool "Default"
help
Since developers @FreeSWITCH are actively working to improve
FreeSWITCH, there is a chance the default git HEAD has long
been oudated.
config FS_WITH_LATEST_HEAD
bool "Latest"
help
Please use this option with cautious. It may and/or may not compile
out of the box and may and/or may not require some additional new
patches.
endchoice
choice
prompt "FS TARRED archive to use"
default FS_WITH_OPENWRT_SOURCE
help
Select which tarred to use: local or OpenWRT
local: Manually downloaded from FS git repo
OpenWRT: FS tarred-file downloaded from source by OpenWRT
FS git repo: https://freeswitch.org/stash/scm/fs/freeswitch.git
config FS_WITH_LOCAL_SOURCE
bool "local"
help
Use local tarred archive. This approach requires a manually checkout
source from FS git repository using 'git clone', then package the
source using tar with XZ compression. The tarred file should include
$(PKG_VERSION) as follows:
1. "git clone git://git.freeswitch.org/freeswitch.git <dir>"
2. Change to <dir>.
3. "git checkout $(FS_DEFAULT_HEAD) && git submodule update"
4. Back to parent <dir>.
5. "tar -Jcf freeswitch_git-$(PKG_VERSION).tar.xz <dir>"
6. Move the tarred file to OpenWRT download directory.
config FS_WITH_OPENWRT_SOURCE
bool "OpenWRT"
help
Use (download) tarred archive from OpenWRT.
endchoice
choice
prompt "Select database"
default FS_WITH_SQLITE3
help
Select which database library to use for libs/apr-util package.
Default is SQLite.
config FS_WITH_MYSQL
bool "MySQL"
help
Compile libs/apr-util with MySQL support.
config FS_WITH_POSTGRESQL
bool "PostgreSQL"
help
Compile libs/apr-util with PostgreSQL support.
config FS_WITH_SQLITE3
bool "SQLITE3"
help
Compile libs/apr-util with SQLITE3 support.
endchoice
config FS_WITH_ALSA
bool "Enable ALSA for sound support"
default y
help
Compile with ALSA support.
config FS_WITH_VISIBILITY
bool "Enable API visibility support"
default y
help
Compile with API visibility support.
config FS_WITH_APR_CONFIG_SWITCHES
bool "Enable APR configuration switches"
default y
help
Enable some configure switches in libs/apr.
config FS_WITH_APR_IPV6
depends on FS_WITH_APR_CONFIG_SWITCHES
bool "Enable IPV6 support in APR"
default y
help
Compile libs/apr package with IPV6 support.
config FS_WITH_APR_SCTP
depends on FS_WITH_APR_CONFIG_SWITCHES
bool "Enable SCTP support in APR"
default y
help
Compile with SCTP (Stream Control Transfer Protocol)
support in lib APR.
config FS_WITH_APR_THREADS
depends on FS_WITH_APR_CONFIG_SWITCHES
bool "Enable threading support in APR"
default y
help
Compile with threads support in libs/apr.
config FS_WITH_BUILTIN_ZRTP
bool "Enable built-in ZRTP"
default y
help
Compile with ZRTP support.
config FS_WITH_OGG
bool "Enable ogg support in mod_celt"
default y
help
Enable this option to allow use of OGG in mod_celt.
config FS_WITH_CORE_LIBEDIT_SUPPORT
bool "Compile with libedit Support"
default n
help
Compile with libedit Support. ATM, libedit isn't
supported by OpenWRT.
config FS_WITH_FHS
bool "Follow the FHS when placing files and directories"
default y
help
Build FreeSWITCH to comply with FHS when placing
files and directories.
config FS_WITH_LIBVPX
bool "Enable building libvpx"
default y
help
Compile to build libs/libvpx.
config FS_WITH_LIBYUV
bool "Enable building libyuv"
default y
help
Compile to build libs/libyuv.
config FS_WITH_LZMA
bool "Enable liblzma usage in libtiff"
default y
help
Compile libs/tiff package with liblzma support. This option
requires LZMA2 compression package called liblzma.
config FS_WITH_ODBC
depends on PACKAGE_sqliteodbc
depends on PACKAGE_unixodbc_svn
bool "Compile with ODBC support (Requires unixodbc NOT YET AVAILABLE)"
default n
help
Enable ODBC support. Since both sqliteodbc and unixodbc
packages are not yet available on OpenWRT, ODBC support
should not be enabled.
config FS_WITH_OPENSSL
bool "Enable SSL support"
default y
help
Compile with SSL support.
config FS_WITH_OPT
bool "Enable optimization"
default y
help
Compile with optimization flag enabled. This
will add max optimising compiler flags
config FS_WITH_SILENT_RULES
bool "Enable with less verbose build output"
default n
help
Enable this option to produce a less verbose build output
(undo: "make V=1")
config FS_WITH_SRTP
bool "Enable SRTP"
default y
help
Compile with SRTP support.
config FS_WITH_SRTP_GENERIC_AESICM
depends on FS_WITH_SRTP
bool "Compile in changes for ISMAcryp"
default y
help
Compile in changes for ISMAcryp.
config FS_WITH_SRTP_KERNEL_LINUX
depends on FS_WITH_SRTP
bool "Build library to run in Linux kernel context"
default n
help
Build library to run in Linux kernel context.
config FS_WITH_SRTP_OPENSSL
depends on FS_WITH_SRTP
bool "Use OpenSSL crypto primitives to build SRTP"
default y
help
Use OpenSSL crypto primitives.
config FS_WITH_STUN
bool "Enable stun module"
default y
help
Enable stun module.
config FS_WITH_ERLANG
depends on PACKAGE_freeswitch-mod-erlang-event
string
prompt "path to erlang installed directory"
default "$$(STAGING_DIR_HOSTPKG)/lib/erlang"
help
Specify the path to erlang libraries.
# config FS_WITH_OGG_INCLUDES
# string
# prompt "OGG include HEADER path"
# default "$$(STAGING_DIR)/usr/include"
# help
# Specify the include header path for OGG library.
config FS_WITH_PYTHON
bool "Enable to use system provided version of python"
default y
help
Enable to use system provided version of python.
config FS_WITH_PYTHON_PATH
depends on FS_WITH_PYTHON
string
prompt "full path to binary python$(PYTHON3_VERSION)"
default "$$(STAGING_DIR_HOSTPKG)/bin/python$(PYTHON3_VERSION)"
help
Specify the full path to binary python$(PYTHON3-VERSION).
endmenu

File diff suppressed because it is too large Load diff

View file

@ -1,11 +0,0 @@
config 'global' 'state'
option 'started' '0'
config 'profile_top' 'internal_top'
config 'profile_top' 'external_top'
config 'external_gateway' 'external_example'

View file

@ -1,11 +0,0 @@
#FS_DIR="/opt"
FS_DIR_ETC="$FS_DIR/etc/freeswitch"
FS_DIR_MOD="$FS_DIR/usr/lib/freeswitch"
FS_DIR_DB="$FS_DIR/tmp/freeswitch/db"
FS_DIR_LOG="$FS_DIR/tmp/freeswitch/log"
FS_DIR_SCRIPTS="$FS_DIR/usr/share/freeswitch/scripts"
FS_DIR_HTDOCS="$FS_DIR/usr/share/freeswitch/htdocs"
FS_DIR_RECORDINGS="/var/lib/freeswitch/recordings" # NOTE: must be changed in config as well
FS_DIR_VM_STORAGE="/var/lib/freeswitch/storage" # NOTE: must be changed in config as well
OPTIONS="-conf $FS_DIR_ETC -log $FS_DIR_LOG -db $FS_DIR_DB -mod $FS_DIR_MOD -htdocs $FS_DIR_HTDOCS -scripts $FS_DIR_SCRIPTS"

View file

@ -1,65 +0,0 @@
#!/bin/sh
. /lib/functions.sh
LOAD_STATE=1
if [ "$ACTION" = "ifup" ]; then
/etc/init.d/freeswitch enabled && {
local not_all_up="$(sh -c '
. /lib/functions.sh
LOAD_STATE=1
local if_is_down=0
local network_ignore=""
check_if_down () {
local cfg="$1"
local up
local proto
config_get_bool up "$1" up 0
config_get proto "$1" proto
if [ "$proto" != "none" ] && [ "$up" -ne 1 ]; then
local new_down=1
local oIFS="$IFS"
local ignore
IFS=" "
for ignore in $network_ignore; do
[ "$cfg" = "$ignore" ] && new_down=0
done
IFS="$oIFS"
[ "$new_down" = "1" ] && if_is_down=1
fi
}
append_ignore() {
local cfg="$1"
local network
config_get network "$1" network
append network_ignore "$network"
}
LOAD_STATE=1
config_load freeswitch
config_foreach append_ignore network_ignore
config_load network
config_foreach check_if_down interface
echo "$if_is_down"
')"
[ "$not_all_up" = "0" ] && {
local started
{
mkdir -p /tmp/freeswitch
lock /tmp/freeswitch/.start.lck
config_load freeswitch
config_get started "state" started
[ "$started" != "1" ] && {
/etc/init.d/freeswitch start
uci_set_state freeswitch global state started 1
}
lock -u /tmp/freeswitch/.start.lck
} &
}
}
fi

View file

@ -1,40 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=90
DEFAULT=/etc/default/freeswitch
OPTIONS=""
#boot() {
# # Do nothing on boot
# exit 0
#}
start() {
[ -f $DEFAULT ] && . $DEFAULT
mkdir -p $FS_DIR_DB
mkdir -p $FS_DIR_LOG
mkdir -p $FS_DIR_RECORDINGS
mkdir -p $FS_DIR_VM_STORAGE
ulimit -s 240
$FS_DIR/usr/bin/freeswitch $OPTIONS -nc
}
stop() {
[ -f $DEFAULT ] && . $DEFAULT
$FS_DIR/usr/bin/freeswitch $OPTIONS -stop
}
restart() {
# stopping freeswitch is non-blocking, so we wait until freeswitch's
# event socket is down, and then wait an additional ten seconds so that
# freeswitch should be completely shutdown before we start it again
local retval
stop
fs_cli -x status >/dev/null 2>&1
retval=$?
while [ $retval -eq 0 ]; do sleep 1; fs_cli -x status >/dev/null 2>&1; retval=$?; done
sleep 10
start
}

View file

@ -1,11 +0,0 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -559,7 +559,7 @@ libs/libzrtp/libzrtp.a:
cd libs/libzrtp && $(MAKE)
libs/libvpx/Makefile:
- cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)"
+ cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CROSS="$(ARCH)-openwrt-linux LD=$(CXX)" ./configure --target=generic-gnu --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)"
libs/libvpx/libvpx.a: libs/libvpx/Makefile
@cd libs/libvpx && $(MAKE)

View file

@ -1,97 +0,0 @@
--- 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],
@@ -20,22 +20,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])
@@ -43,9 +44,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])
@@ -59,10 +67,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"],
@@ -76,7 +85,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])
AM_CONDITIONAL([HAVE_ERLANG],[true])
@@ -87,12 +96,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
])

View file

@ -1,10 +0,0 @@
--- a/build/modules.conf.in
+++ b/build/modules.conf.in
@@ -39,6 +39,7 @@ applications/mod_httapi
#applications/mod_rad_auth
#applications/mod_redis
#applications/mod_rss
+#applications/mod_skel
applications/mod_sms
#applications/mod_sms_flowroute
#applications/mod_snapshot

View file

@ -1,10 +0,0 @@
--- /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

View file

@ -1,178 +0,0 @@
--- a/configure.ac
+++ b/configure.ac
@@ -257,9 +257,9 @@ 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
+ ac_cv_file__dev_ptmx=no
# libjs
export ac_cv_va_copy=yes
# srtp
@@ -276,7 +276,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
@@ -419,10 +419,6 @@ elif test "x${ax_cv_c_compiler_vendor}"
APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC -ffast-math)
APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC -ffast-math)
AC_SUBST([AM_MOD_AVMD_CXXFLAGS], [-std=gnu99]) # FS-8809, needed for MAP_POPULATE
- if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then
- APR_ADDTO(SWITCH_AM_CFLAGS, -Werror)
- APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-unused-result)
- fi
if test "$ac_cv_gcc_supports_w_no_misleading_indentation" = yes; then
APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-misleading-indentation)
fi
@@ -948,7 +944,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],,,[
@@ -1560,18 +1555,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],[yes],[no],[${STAGING_DIR_HOSTPKG}/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`"
+if test "x$ac_cv_prog_PERL" != "xno"; then
+ PERL_VERSION="`$PERL -e 'print substr($^V, 1)' | cut -d. -f1,2`"
+ PERL_SITEDIR_LOCAL="`$PERL -MConfig -e 'print $Config{archlibexp}'`"
+ PERL_SITEDIR="`find ${STAGING_DIR}/usr -name $PERL_VERSION -print`"
+ PERL_LIBDIR="-L$PERL_SITEDIR/CORE"
+ PERL_LIBS="`$PERL -MConfig -e 'print $Config{libs}' | sed -e 's|-lnsl ||g;s| -lgdbm_compat||g'`"
+ PERL_CFLAGS="-w -DMULTIPLICITY -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV `$PERL -MExtUtils::Embed -e ccopts | sed -e \"s|$PERL_SITEDIR_LOCAL|$PERL_SITEDIR|g;s| -I/usr/local/include||g\"` -DEMBED_PERL"
+ PERL_LDFLAGS="`$PERL -MExtUtils::Embed -e ldopts| sed -e \"s| $PERL_SITEDIR_LOCAL/auto/NDBM_File/NDBM_File.a||g;s| $PERL_SITEDIR_LOCAL/auto/ODBM_File/ODBM_File.a||g;s|$PERL_SITEDIR_LOCAL|$PERL_SITEDIR|g;s|.a |.so |g;s|-lnsl ||g;s|-lgdbm_compat ||g;s|/usr/local|${STAGING_DIR}/usr|g\"`"
+ PERL_INC="-I$PERL_SITEDIR/CORE"
save_CFLAGS="$CFLAGS"
CFLAGS="$PERL_CFLAGS"
@@ -1581,34 +1576,39 @@ if test "x$ac_cv_have_perl" != "xno"; th
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$PERL_LDFLAGS"
- AC_CHECK_LIB([perl], [perl_alloc], ac_cv_use_libperl=yes, ac_cv_use_libperl=no)
+ AC_CHECK_LIB([perl], [perl_alloc], [ac_cv_use_libperl=yes], [ac_cv_use_libperl=no])
LDFLAGS="$save_LDFLAGS"
+ AC_SUBST(PERL)
AC_SUBST(PERL_SITEDIR)
+ AC_SUBST(PERL_SITEDIR_LOCAL)
AC_SUBST(PERL_LIBDIR)
AC_SUBST(PERL_LIBS)
AC_SUBST(PERL_CFLAGS)
AC_SUBST(PERL_LDFLAGS)
AC_SUBST(PERL_INC)
+ AC_SUBST(PERL_VERSION)
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"])
+AM_CONDITIONAL([HAVE_PERL],[test "x$ac_cv_prog_PERL" = "xyes" -a "x$ac_cv_have_EXTERN_h" = "xyes" -a "x$ac_cv_use_libperl" = "xyes"])
+#AM_CONDITIONAL([HAVE_PERL],[test "x$ac_cv_prog_PERL" != "xno" -a "x$ac_cv_have_EXTERN_h" != "xno"])
#
# 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])
+dnl AC_CHECK_PROG(PHP_CONFIG,php-config,[ac_cv_have_php_config=yes],[ac_cv_have_php_config=no],[${STAGING_DIR}/usr/bin])
+AC_CHECK_PROG(PHP_CONFIG,php7-config,[ac_cv_have_php_config=yes],[ac_cv_have_php_config=no],[${STAGING_DIR}/usr/bin])
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_CONFIG=${STAGING_DIR}/usr/bin/php7-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_EXT_DIR="`$PHP_CONFIG --extension-dir`"
- PHP_INC_DIR="`$PHP -r 'echo ini_get("include_path");' | cut -d: -f2`"
+ PHP_INC_DIR="`$PHP_CONFIG --includes | cut -d" " -f1 | cut -dI -f2`"
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)
@@ -1623,7 +1623,7 @@ fi
# Python checks for mod_python
#
AC_ARG_WITH(
- [python],
+ [python3],
[AS_HELP_STRING([--with-python], [Use system provided version of python (default: try)])],
[with_python="$withval"],
[with_python="try"]
@@ -1642,17 +1642,18 @@ then
AC_MSG_RESULT([$with_python])
AC_SUBST([PYTHON], ["$with_python"])
else
- AC_PATH_PROG([PYTHON], ["python"], ["no"], ["$PATH:/usr/bin:/usr/local/bin"])
+ AC_PATH_PROG([PYTHON], ["python3"], ["no"], ["${STAGING_DIR_HOSTPKG}/bin"])
fi
if test "$PYTHON" != "no" ; then
AC_MSG_CHECKING([python version])
- PYTHON_VER="`$PYTHON -V 2>&1 | cut -d' ' -f2`"
+ PYTHON_VER=`$PYTHON -c "import sys; print('%d.%d' % (sys.version_info[[0]], sys.version_info[[1]]))"`
if test -z "$PYTHON_VER" ; then
AC_MSG_ERROR([Unable to detect python version])
fi
AC_MSG_RESULT([$PYTHON_VER])
+ AC_SUBST([PYTHON_VER], [$PYTHON_VER])
AC_MSG_CHECKING([for python distutils])
python_result="`$PYTHON -c 'import distutils;' 2>&1`"
@@ -1666,12 +1667,12 @@ then
if test "$python_has_distutils" != "no" ; then
AC_MSG_CHECKING([location of site-packages])
- PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
+ if test -d "`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`" ; then
+ PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
- if test -z "$PYTHON_SITE_DIR" ; then
- AC_MSG_ERROR([Unable to detect python site-packages path])
- elif test ! -d "$PYTHON_SITE_DIR" ; then
- AC_MSG_ERROR([Path $PYTHON_SITE_DIR returned by python does not exist!])
+ if test -z "$PYTHON_SITE_DIR" ; then
+ AC_MSG_ERROR([Unable to detect python site-packages path])
+ fi
fi
AC_MSG_RESULT([$PYTHON_SITE_DIR])
AC_SUBST([PYTHON_SITE_DIR], [$PYTHON_SITE_DIR])
@@ -1679,10 +1680,10 @@ then
#
# python distutils found, get settings from python directly
#
- PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));' | sed -e 's/-arch i386//g;s/-arch x86_64//g'`"
+ PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));'`"
PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print(\" \".join(libs));'`"
PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print(\"python\" + sysconfig.get_config_var(\"VERSION\"));'`"
- PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));'`"
+ PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));' | sed -e 's|\(^.*\)/staging_dir/hostpkg|/${STAGING_DIR}/usr|g'`"
# handle python being installed into /usr/local
AC_MSG_CHECKING([python libdir])

View file

@ -1,55 +0,0 @@
--- a/libs/apr/configure.ac
+++ b/libs/apr/configure.ac
@@ -1624,38 +1624,7 @@ if test "$threads" = "1"; then
APR_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h)
AC_CHECK_FUNCS(pthread_mutexattr_setpshared)
AC_CHECK_LIB(pthread, pthread_setschedparam, [AC_DEFINE(HAVE_PTHREAD_SETSCHEDPARAM, 1, [Define if you have pthread_setschedparam()])])
-
- # Some systems have setpshared and define PROCESS_SHARED, but don't
- # really support PROCESS_SHARED locks. So, we must validate that we
- # can go through the steps without receiving some sort of system error.
- # Linux and older versions of AIX have this problem.
- APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED func:pthread_mutexattr_setpshared, [
- AC_CACHE_CHECK([for working PROCESS_SHARED locks], apr_cv_process_shared_works, [
- AC_TRY_RUN([
-#include <sys/types.h>
-#include <pthread.h>
- int main()
- {
- pthread_mutex_t mutex;
- pthread_mutexattr_t attr;
- if (pthread_mutexattr_init(&attr))
- exit(1);
- if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED))
- exit(2);
- if (pthread_mutex_init(&mutex, &attr))
- exit(3);
- if (pthread_mutexattr_destroy(&attr))
- exit(4);
- if (pthread_mutex_destroy(&mutex))
- exit(5);
- exit(0);
- }], [apr_cv_process_shared_works=yes], [apr_cv_process_shared_works=no])])
- # Override detection of pthread_mutexattr_setpshared
- ac_cv_func_pthread_mutexattr_setpshared=$apr_cv_process_shared_works])
-
- if test "$ac_cv_func_pthread_mutexattr_setpshared" = "yes"; then
- APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX
- fi
+ APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX
fi
# See which lock mechanisms we can support on this system.
@@ -1956,7 +1925,11 @@ fi
APR_CHECK_TCP_NODELAY_INHERITED
APR_CHECK_O_NONBLOCK_INHERITED
-APR_CHECK_TCP_NODELAY_WITH_CORK
+
+dnl Check TCP_NODELAY_WITH_CORK ONLY when NOT cross compiling
+if test "$cross_compiling" != yes; then
+ APR_CHECK_TCP_NODELAY_WITH_CORK
+fi
# Look for a way of corking TCP...
APR_CHECK_DEFINE(TCP_CORK, netinet/tcp.h)

View file

@ -1,8 +0,0 @@
--- a/libs/apr-util/configure.gnu
+++ b/libs/apr-util/configure.gnu
@@ -1,4 +1,4 @@
#! /bin/sh
srcpath=$(dirname $0 2>/dev/null ) || srcpath="."
-$srcpath/configure "$@" --with-apr=../apr --disable-shared --with-pic --without-sqlite2 --without-sqlite3 --with-expat=builtin
+$srcpath/configure "$@" --with-apr=../apr --disable-shared --with-expat=builtin

View file

@ -1,13 +0,0 @@
--- a/libs/srtp/configure.ac
+++ b/libs/srtp/configure.ac
@@ -130,10 +130,6 @@ 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 Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(stdlib.h)

View file

@ -1,14 +0,0 @@
--- a/src/mod/applications/mod_http_cache/conf/autoload_configs/http_cache.conf.xml
+++ b/src/mod/applications/mod_http_cache/conf/autoload_configs/http_cache.conf.xml
@@ -9,9 +9,9 @@
<param name="ssl-verifyhost" value="true"/>
<param name="ssl-verifypeer" value="true"/>
<!-- default is 300 seconds, override here -->
- <!--param name="connect-timeout" value="300"/-->
+ <!-- param name="connect-timeout" value="300"/> -->
<!-- default is 300 seconds, override here -->
- <!--param name="download-timeout" value="300"/-->
+ <!--param name="download-timeout" value="300"/> -->
</settings>
<profiles>

View file

@ -1,11 +0,0 @@
--- a/src/mod/endpoints/mod_sofia/conf/sofia.conf.xml
+++ b/src/mod/endpoints/mod_sofia/conf/sofia.conf.xml
@@ -216,7 +216,7 @@
<!-- <param name="unregister-on-options-fail" value="true"/> -->
<!-- Send an OPTIONS packet to all registered endpoints -->
<!--<param name="all-reg-options-ping" value="true"/>-->
- <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only
+ <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only -->
<!--<param name="nat-options-ping" value="true"/>-->
<!-- TLS: disabled by default, set to "true" to enable -->

View file

@ -1,28 +0,0 @@
--- 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 = /usr/lib/perl5/@PERL_VERSION@/CORE
+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:

View file

@ -1,49 +0,0 @@
--- a/src/mod/languages/mod_perl/Makefile.am
+++ b/src/mod/languages/mod_perl/Makefile.am
@@ -1,29 +1,27 @@
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 = /usr/lib/perl5/@PERL_VERSION@/CORE
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 = $(SWITCH_AM_CFLAGS)
-mod_perl_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS)
-mod_perl_la_CPPFLAGS = -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
+mod_perl_la_CFLAGS = $(SWITCH_AM_CFLAGS) @PERL_INC@
+mod_perl_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS) @PERL_INC@
+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_LDFLAGS@ @PERL_LIBS@
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 = $(SWITCH_AM_CPPFLAGS) -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
+freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
+
reswig: swigclean mod_perl_wrap.cpp
swigclean: clean
rm -f mod_perl_wrap.* freeswitch.so freeswitch.pm
mod_perl_wrap.cpp:
- swig2.0 -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
+ ${STAGING_DIR_HOSTPKG}/bin/swig -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
echo "#include \"mod_perl_extra.c\"" >> mod_perl_wrap.cpp
patch -s -p0 -i hack.diff
@@ -31,7 +29,7 @@ orig: mod_perl_wrap.cpp
patch -R -s -p0 -i hack.diff
.perlok:
- @(${PERL} -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
+ @(@PERL@ -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
|| ((echo Sorry, you need to compile perl with threads and multiplicity.&& exit 1))
@touch .perlok

View file

@ -1,20 +0,0 @@
--- a/src/mod/languages/mod_python/Makefile.am
+++ b/src/mod/languages/mod_python/Makefile.am
@@ -2,7 +2,7 @@ include $(top_srcdir)/build/modmake.rule
MODNAME=mod_python
PYMOD=freeswitch
-PYTHON_SITE_DIR=@PYTHON_SITE_DIR@
+PYTHON_SITE_DIR=/usr/lib/python@PYTHON_VER@/site-packages
SWIGCFILE=../../../switch_swig.c
SWIGIFILE=../../../switch_swig.i
@@ -20,7 +20,7 @@ swigclean: clean
rm -f mod_python_wrap.* freeswitch.py
mod_python_wrap.cpp: mod_python_extra.c hack.diff
- swig2.0 -python -c++ -I../../../../src/include -oh mod_python_wrap.h -o mod_python_wrap.cpp mod_python.i
+ ${STAGING_DIR_HOSTPKG}/bin/swig -python -c++ -I../../../../src/include -oh mod_python_wrap.h -o mod_python_wrap.cpp mod_python.i
echo "#include \"mod_python_extra.c\"" >> mod_python_wrap.cpp
patch -s -p0 -i hack.diff

View file

@ -1,15 +0,0 @@
--- a/src/mod/languages/mod_python/freeswitch_python.cpp
+++ b/src/mod/languages/mod_python/freeswitch_python.cpp
@@ -319,7 +319,12 @@ switch_status_t Session::run_dtmf_callba
}
if ((pyresult = PyEval_CallObject(cb_function, arglist))) {
+#if PY_MAJOR_VERSION < 3
str = (char *) PyString_AsString(pyresult);
+#else
+ //str = (char *) pyresult->encode('UTF-8');
+ str = (char *) PyUnicode_AsUnicode(pyresult);
+#endif
} else {
PyErr_Print();
}

View file

@ -1,11 +0,0 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -559,7 +559,7 @@ libs/libzrtp/libzrtp.a:
cd libs/libzrtp && $(MAKE)
libs/libvpx/Makefile:
- cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)"
+ cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CROSS="$(ARCH)-openwrt-linux LD=$(CXX)" ./configure --target=generic-gnu --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)"
libs/libvpx/libvpx.a: libs/libvpx/Makefile
@cd libs/libvpx && $(MAKE)

View file

@ -1,97 +0,0 @@
--- 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],
@@ -20,22 +20,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])
@@ -43,9 +44,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])
@@ -59,10 +67,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"],
@@ -76,7 +85,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])
AM_CONDITIONAL([HAVE_ERLANG],[true])
@@ -87,12 +96,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
])

View file

@ -1,10 +0,0 @@
--- a/build/modules.conf.in
+++ b/build/modules.conf.in
@@ -39,6 +39,7 @@ applications/mod_httapi
#applications/mod_rad_auth
#applications/mod_redis
#applications/mod_rss
+#applications/mod_skel
applications/mod_sms
#applications/mod_sms_flowroute
#applications/mod_snapshot

View file

@ -1,10 +0,0 @@
--- /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

View file

@ -1,178 +0,0 @@
--- a/configure.ac
+++ b/configure.ac
@@ -257,9 +257,9 @@ 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
+ ac_cv_file__dev_ptmx=no
# libjs
export ac_cv_va_copy=yes
# srtp
@@ -276,7 +276,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
@@ -419,10 +419,6 @@ elif test "x${ax_cv_c_compiler_vendor}"
APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC -ffast-math)
APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC -ffast-math)
AC_SUBST([AM_MOD_AVMD_CXXFLAGS], [-std=gnu99]) # FS-8809, needed for MAP_POPULATE
- if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then
- APR_ADDTO(SWITCH_AM_CFLAGS, -Werror)
- APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-unused-result)
- fi
if test "$ac_cv_gcc_supports_w_no_misleading_indentation" = yes; then
APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-misleading-indentation)
fi
@@ -948,7 +944,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],,,[
@@ -1560,18 +1555,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],[yes],[no],[${STAGING_DIR_HOSTPKG}/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`"
+if test "x$ac_cv_prog_PERL" != "xno"; then
+ PERL_VERSION="`$PERL -e 'print substr($^V, 1)' | cut -d. -f1,2`"
+ PERL_SITEDIR_LOCAL="`$PERL -MConfig -e 'print $Config{archlibexp}'`"
+ PERL_SITEDIR="`find ${STAGING_DIR}/usr -name $PERL_VERSION -print`"
+ PERL_LIBDIR="-L$PERL_SITEDIR/CORE"
+ PERL_LIBS="`$PERL -MConfig -e 'print $Config{libs}' | sed -e 's|-lnsl ||g;s| -lgdbm_compat||g'`"
+ PERL_CFLAGS="-w -DMULTIPLICITY -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV `$PERL -MExtUtils::Embed -e ccopts | sed -e \"s|$PERL_SITEDIR_LOCAL|$PERL_SITEDIR|g;s| -I/usr/local/include||g\"` -DEMBED_PERL"
+ PERL_LDFLAGS="`$PERL -MExtUtils::Embed -e ldopts| sed -e \"s| $PERL_SITEDIR_LOCAL/auto/NDBM_File/NDBM_File.a||g;s| $PERL_SITEDIR_LOCAL/auto/ODBM_File/ODBM_File.a||g;s|$PERL_SITEDIR_LOCAL|$PERL_SITEDIR|g;s|.a |.so |g;s|-lnsl ||g;s|-lgdbm_compat ||g;s|/usr/local|${STAGING_DIR}/usr|g\"`"
+ PERL_INC="-I$PERL_SITEDIR/CORE"
save_CFLAGS="$CFLAGS"
CFLAGS="$PERL_CFLAGS"
@@ -1581,34 +1576,39 @@ if test "x$ac_cv_have_perl" != "xno"; th
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$PERL_LDFLAGS"
- AC_CHECK_LIB([perl], [perl_alloc], ac_cv_use_libperl=yes, ac_cv_use_libperl=no)
+ AC_CHECK_LIB([perl], [perl_alloc], [ac_cv_use_libperl=yes], [ac_cv_use_libperl=no])
LDFLAGS="$save_LDFLAGS"
+ AC_SUBST(PERL)
AC_SUBST(PERL_SITEDIR)
+ AC_SUBST(PERL_SITEDIR_LOCAL)
AC_SUBST(PERL_LIBDIR)
AC_SUBST(PERL_LIBS)
AC_SUBST(PERL_CFLAGS)
AC_SUBST(PERL_LDFLAGS)
AC_SUBST(PERL_INC)
+ AC_SUBST(PERL_VERSION)
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"])
+AM_CONDITIONAL([HAVE_PERL],[test "x$ac_cv_prog_PERL" = "xyes" -a "x$ac_cv_have_EXTERN_h" = "xyes" -a "x$ac_cv_use_libperl" = "xyes"])
+#AM_CONDITIONAL([HAVE_PERL],[test "x$ac_cv_prog_PERL" != "xno" -a "x$ac_cv_have_EXTERN_h" != "xno"])
#
# 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])
+dnl AC_CHECK_PROG(PHP_CONFIG,php-config,[ac_cv_have_php_config=yes],[ac_cv_have_php_config=no],[${STAGING_DIR}/usr/bin])
+AC_CHECK_PROG(PHP_CONFIG,php7-config,[ac_cv_have_php_config=yes],[ac_cv_have_php_config=no],[${STAGING_DIR}/usr/bin])
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_CONFIG=${STAGING_DIR}/usr/bin/php7-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_EXT_DIR="`$PHP_CONFIG --extension-dir`"
- PHP_INC_DIR="`$PHP -r 'echo ini_get("include_path");' | cut -d: -f2`"
+ PHP_INC_DIR="`$PHP_CONFIG --includes | cut -d" " -f1 | cut -dI -f2`"
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)
@@ -1623,7 +1623,7 @@ fi
# Python checks for mod_python
#
AC_ARG_WITH(
- [python],
+ [python3],
[AS_HELP_STRING([--with-python], [Use system provided version of python (default: try)])],
[with_python="$withval"],
[with_python="try"]
@@ -1642,17 +1642,18 @@ then
AC_MSG_RESULT([$with_python])
AC_SUBST([PYTHON], ["$with_python"])
else
- AC_PATH_PROG([PYTHON], ["python"], ["no"], ["$PATH:/usr/bin:/usr/local/bin"])
+ AC_PATH_PROG([PYTHON], ["python3"], ["no"], ["${STAGING_DIR_HOSTPKG}/bin"])
fi
if test "$PYTHON" != "no" ; then
AC_MSG_CHECKING([python version])
- PYTHON_VER="`$PYTHON -V 2>&1 | cut -d' ' -f2`"
+ PYTHON_VER=`$PYTHON -c "import sys; print('%d.%d' % (sys.version_info[[0]], sys.version_info[[1]]))"`
if test -z "$PYTHON_VER" ; then
AC_MSG_ERROR([Unable to detect python version])
fi
AC_MSG_RESULT([$PYTHON_VER])
+ AC_SUBST([PYTHON_VER], [$PYTHON_VER])
AC_MSG_CHECKING([for python distutils])
python_result="`$PYTHON -c 'import distutils;' 2>&1`"
@@ -1666,12 +1667,12 @@ then
if test "$python_has_distutils" != "no" ; then
AC_MSG_CHECKING([location of site-packages])
- PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
+ if test -d "`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`" ; then
+ PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
- if test -z "$PYTHON_SITE_DIR" ; then
- AC_MSG_ERROR([Unable to detect python site-packages path])
- elif test ! -d "$PYTHON_SITE_DIR" ; then
- AC_MSG_ERROR([Path $PYTHON_SITE_DIR returned by python does not exist!])
+ if test -z "$PYTHON_SITE_DIR" ; then
+ AC_MSG_ERROR([Unable to detect python site-packages path])
+ fi
fi
AC_MSG_RESULT([$PYTHON_SITE_DIR])
AC_SUBST([PYTHON_SITE_DIR], [$PYTHON_SITE_DIR])
@@ -1679,10 +1680,10 @@ then
#
# python distutils found, get settings from python directly
#
- PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));' | sed -e 's/-arch i386//g;s/-arch x86_64//g'`"
+ PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));'`"
PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print(\" \".join(libs));'`"
PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print(\"python\" + sysconfig.get_config_var(\"VERSION\"));'`"
- PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));'`"
+ PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));' | sed -e 's|\(^.*\)/staging_dir/hostpkg|/${STAGING_DIR}/usr|g'`"
# handle python being installed into /usr/local
AC_MSG_CHECKING([python libdir])

View file

@ -1,55 +0,0 @@
--- a/libs/apr/configure.ac
+++ b/libs/apr/configure.ac
@@ -1624,38 +1624,7 @@ if test "$threads" = "1"; then
APR_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h)
AC_CHECK_FUNCS(pthread_mutexattr_setpshared)
AC_CHECK_LIB(pthread, pthread_setschedparam, [AC_DEFINE(HAVE_PTHREAD_SETSCHEDPARAM, 1, [Define if you have pthread_setschedparam()])])
-
- # Some systems have setpshared and define PROCESS_SHARED, but don't
- # really support PROCESS_SHARED locks. So, we must validate that we
- # can go through the steps without receiving some sort of system error.
- # Linux and older versions of AIX have this problem.
- APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED func:pthread_mutexattr_setpshared, [
- AC_CACHE_CHECK([for working PROCESS_SHARED locks], apr_cv_process_shared_works, [
- AC_TRY_RUN([
-#include <sys/types.h>
-#include <pthread.h>
- int main()
- {
- pthread_mutex_t mutex;
- pthread_mutexattr_t attr;
- if (pthread_mutexattr_init(&attr))
- exit(1);
- if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED))
- exit(2);
- if (pthread_mutex_init(&mutex, &attr))
- exit(3);
- if (pthread_mutexattr_destroy(&attr))
- exit(4);
- if (pthread_mutex_destroy(&mutex))
- exit(5);
- exit(0);
- }], [apr_cv_process_shared_works=yes], [apr_cv_process_shared_works=no])])
- # Override detection of pthread_mutexattr_setpshared
- ac_cv_func_pthread_mutexattr_setpshared=$apr_cv_process_shared_works])
-
- if test "$ac_cv_func_pthread_mutexattr_setpshared" = "yes"; then
- APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX
- fi
+ APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX
fi
# See which lock mechanisms we can support on this system.
@@ -1956,7 +1925,11 @@ fi
APR_CHECK_TCP_NODELAY_INHERITED
APR_CHECK_O_NONBLOCK_INHERITED
-APR_CHECK_TCP_NODELAY_WITH_CORK
+
+dnl Check TCP_NODELAY_WITH_CORK ONLY when NOT cross compiling
+if test "$cross_compiling" != yes; then
+ APR_CHECK_TCP_NODELAY_WITH_CORK
+fi
# Look for a way of corking TCP...
APR_CHECK_DEFINE(TCP_CORK, netinet/tcp.h)

View file

@ -1,8 +0,0 @@
--- a/libs/apr-util/configure.gnu
+++ b/libs/apr-util/configure.gnu
@@ -1,4 +1,4 @@
#! /bin/sh
srcpath=$(dirname $0 2>/dev/null ) || srcpath="."
-$srcpath/configure "$@" --with-apr=../apr --disable-shared --with-pic --without-sqlite2 --without-sqlite3 --with-expat=builtin
+$srcpath/configure "$@" --with-apr=../apr --disable-shared --with-expat=builtin

View file

@ -1,13 +0,0 @@
--- a/libs/srtp/configure.ac
+++ b/libs/srtp/configure.ac
@@ -130,10 +130,6 @@ 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 Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(stdlib.h)

View file

@ -1,14 +0,0 @@
--- a/src/mod/applications/mod_http_cache/conf/autoload_configs/http_cache.conf.xml
+++ b/src/mod/applications/mod_http_cache/conf/autoload_configs/http_cache.conf.xml
@@ -9,9 +9,9 @@
<param name="ssl-verifyhost" value="true"/>
<param name="ssl-verifypeer" value="true"/>
<!-- default is 300 seconds, override here -->
- <!--param name="connect-timeout" value="300"/-->
+ <!-- param name="connect-timeout" value="300"/> -->
<!-- default is 300 seconds, override here -->
- <!--param name="download-timeout" value="300"/-->
+ <!--param name="download-timeout" value="300"/> -->
</settings>
<profiles>

View file

@ -1,11 +0,0 @@
--- a/src/mod/endpoints/mod_sofia/conf/sofia.conf.xml
+++ b/src/mod/endpoints/mod_sofia/conf/sofia.conf.xml
@@ -216,7 +216,7 @@
<!-- <param name="unregister-on-options-fail" value="true"/> -->
<!-- Send an OPTIONS packet to all registered endpoints -->
<!--<param name="all-reg-options-ping" value="true"/>-->
- <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only
+ <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only -->
<!--<param name="nat-options-ping" value="true"/>-->
<!-- TLS: disabled by default, set to "true" to enable -->

View file

@ -1,28 +0,0 @@
--- 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 = /usr/lib/perl5/@PERL_VERSION@/CORE
+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:

View file

@ -1,49 +0,0 @@
--- a/src/mod/languages/mod_perl/Makefile.am
+++ b/src/mod/languages/mod_perl/Makefile.am
@@ -1,29 +1,27 @@
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 = /usr/lib/perl5/@PERL_VERSION@/CORE
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 = $(SWITCH_AM_CFLAGS)
-mod_perl_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS)
-mod_perl_la_CPPFLAGS = -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
+mod_perl_la_CFLAGS = $(SWITCH_AM_CFLAGS) @PERL_INC@
+mod_perl_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS) @PERL_INC@
+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_LDFLAGS@ @PERL_LIBS@
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 = $(SWITCH_AM_CPPFLAGS) -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
+freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
+
reswig: swigclean mod_perl_wrap.cpp
swigclean: clean
rm -f mod_perl_wrap.* freeswitch.so freeswitch.pm
mod_perl_wrap.cpp:
- swig2.0 -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
+ ${STAGING_DIR_HOSTPKG}/bin/swig -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
echo "#include \"mod_perl_extra.c\"" >> mod_perl_wrap.cpp
patch -s -p0 -i hack.diff
@@ -31,7 +29,7 @@ orig: mod_perl_wrap.cpp
patch -R -s -p0 -i hack.diff
.perlok:
- @(${PERL} -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
+ @(@PERL@ -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
|| ((echo Sorry, you need to compile perl with threads and multiplicity.&& exit 1))
@touch .perlok

View file

@ -1,20 +0,0 @@
--- a/src/mod/languages/mod_python/Makefile.am
+++ b/src/mod/languages/mod_python/Makefile.am
@@ -2,7 +2,7 @@ include $(top_srcdir)/build/modmake.rule
MODNAME=mod_python
PYMOD=freeswitch
-PYTHON_SITE_DIR=@PYTHON_SITE_DIR@
+PYTHON_SITE_DIR=/usr/lib/python@PYTHON_VER@/site-packages
SWIGCFILE=../../../switch_swig.c
SWIGIFILE=../../../switch_swig.i
@@ -20,7 +20,7 @@ swigclean: clean
rm -f mod_python_wrap.* freeswitch.py
mod_python_wrap.cpp: mod_python_extra.c hack.diff
- swig2.0 -python -c++ -I../../../../src/include -oh mod_python_wrap.h -o mod_python_wrap.cpp mod_python.i
+ ${STAGING_DIR_HOSTPKG}/bin/swig -python -c++ -I../../../../src/include -oh mod_python_wrap.h -o mod_python_wrap.cpp mod_python.i
echo "#include \"mod_python_extra.c\"" >> mod_python_wrap.cpp
patch -s -p0 -i hack.diff

View file

@ -1,15 +0,0 @@
--- a/src/mod/languages/mod_python/freeswitch_python.cpp
+++ b/src/mod/languages/mod_python/freeswitch_python.cpp
@@ -319,7 +319,12 @@ switch_status_t Session::run_dtmf_callba
}
if ((pyresult = PyEval_CallObject(cb_function, arglist))) {
+#if PY_MAJOR_VERSION < 3
str = (char *) PyString_AsString(pyresult);
+#else
+ //str = (char *) pyresult->encode('UTF-8');
+ str = (char *) PyUnicode_AsUnicode(pyresult);
+#endif
} else {
PyErr_Print();
}

View file

@ -1,11 +0,0 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -559,7 +559,7 @@ libs/libzrtp/libzrtp.a:
cd libs/libzrtp && $(MAKE)
libs/libvpx/Makefile:
- cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)"
+ cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CROSS="$(ARCH)-openwrt-linux LD=$(CXX)" ./configure --target=generic-gnu --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)"
libs/libvpx/libvpx.a: libs/libvpx/Makefile
@cd libs/libvpx && $(MAKE)

View file

@ -1,97 +0,0 @@
--- 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],
@@ -20,22 +20,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])
@@ -43,9 +44,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])
@@ -59,10 +67,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"],
@@ -76,7 +85,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])
AM_CONDITIONAL([HAVE_ERLANG],[true])
@@ -87,12 +96,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
])

View file

@ -1,10 +0,0 @@
--- a/build/modules.conf.in
+++ b/build/modules.conf.in
@@ -39,6 +39,7 @@ applications/mod_httapi
#applications/mod_rad_auth
#applications/mod_redis
#applications/mod_rss
+#applications/mod_skel
applications/mod_sms
#applications/mod_sms_flowroute
#applications/mod_snapshot

View file

@ -1,10 +0,0 @@
--- /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

View file

@ -1,178 +0,0 @@
--- a/configure.ac
+++ b/configure.ac
@@ -257,9 +257,9 @@ 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
+ ac_cv_file__dev_ptmx=no
# libjs
export ac_cv_va_copy=yes
# srtp
@@ -276,7 +276,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
@@ -419,10 +419,6 @@ elif test "x${ax_cv_c_compiler_vendor}"
APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC -ffast-math)
APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC -ffast-math)
AC_SUBST([AM_MOD_AVMD_CXXFLAGS], [-std=gnu99]) # FS-8809, needed for MAP_POPULATE
- if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then
- APR_ADDTO(SWITCH_AM_CFLAGS, -Werror)
- APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-unused-result)
- fi
if test "$ac_cv_gcc_supports_w_no_misleading_indentation" = yes; then
APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-misleading-indentation)
fi
@@ -948,7 +944,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],,,[
@@ -1560,18 +1555,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],[yes],[no],[${STAGING_DIR_HOSTPKG}/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`"
+if test "x$ac_cv_prog_PERL" != "xno"; then
+ PERL_VERSION="`$PERL -e 'print substr($^V, 1)' | cut -d. -f1,2`"
+ PERL_SITEDIR_LOCAL="`$PERL -MConfig -e 'print $Config{archlibexp}'`"
+ PERL_SITEDIR="`find ${STAGING_DIR}/usr -name $PERL_VERSION -print`"
+ PERL_LIBDIR="-L$PERL_SITEDIR/CORE"
+ PERL_LIBS="`$PERL -MConfig -e 'print $Config{libs}' | sed -e 's|-lnsl ||g;s| -lgdbm_compat||g'`"
+ PERL_CFLAGS="-w -DMULTIPLICITY -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV `$PERL -MExtUtils::Embed -e ccopts | sed -e \"s|$PERL_SITEDIR_LOCAL|$PERL_SITEDIR|g;s| -I/usr/local/include||g\"` -DEMBED_PERL"
+ PERL_LDFLAGS="`$PERL -MExtUtils::Embed -e ldopts| sed -e \"s| $PERL_SITEDIR_LOCAL/auto/NDBM_File/NDBM_File.a||g;s| $PERL_SITEDIR_LOCAL/auto/ODBM_File/ODBM_File.a||g;s|$PERL_SITEDIR_LOCAL|$PERL_SITEDIR|g;s|.a |.so |g;s|-lnsl ||g;s|-lgdbm_compat ||g;s|/usr/local|${STAGING_DIR}/usr|g\"`"
+ PERL_INC="-I$PERL_SITEDIR/CORE"
save_CFLAGS="$CFLAGS"
CFLAGS="$PERL_CFLAGS"
@@ -1581,34 +1576,39 @@ if test "x$ac_cv_have_perl" != "xno"; th
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$PERL_LDFLAGS"
- AC_CHECK_LIB([perl], [perl_alloc], ac_cv_use_libperl=yes, ac_cv_use_libperl=no)
+ AC_CHECK_LIB([perl], [perl_alloc], [ac_cv_use_libperl=yes], [ac_cv_use_libperl=no])
LDFLAGS="$save_LDFLAGS"
+ AC_SUBST(PERL)
AC_SUBST(PERL_SITEDIR)
+ AC_SUBST(PERL_SITEDIR_LOCAL)
AC_SUBST(PERL_LIBDIR)
AC_SUBST(PERL_LIBS)
AC_SUBST(PERL_CFLAGS)
AC_SUBST(PERL_LDFLAGS)
AC_SUBST(PERL_INC)
+ AC_SUBST(PERL_VERSION)
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"])
+AM_CONDITIONAL([HAVE_PERL],[test "x$ac_cv_prog_PERL" = "xyes" -a "x$ac_cv_have_EXTERN_h" = "xyes" -a "x$ac_cv_use_libperl" = "xyes"])
+#AM_CONDITIONAL([HAVE_PERL],[test "x$ac_cv_prog_PERL" != "xno" -a "x$ac_cv_have_EXTERN_h" != "xno"])
#
# 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])
+dnl AC_CHECK_PROG(PHP_CONFIG,php-config,[ac_cv_have_php_config=yes],[ac_cv_have_php_config=no],[${STAGING_DIR}/usr/bin])
+AC_CHECK_PROG(PHP_CONFIG,php7-config,[ac_cv_have_php_config=yes],[ac_cv_have_php_config=no],[${STAGING_DIR}/usr/bin])
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_CONFIG=${STAGING_DIR}/usr/bin/php7-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_EXT_DIR="`$PHP_CONFIG --extension-dir`"
- PHP_INC_DIR="`$PHP -r 'echo ini_get("include_path");' | cut -d: -f2`"
+ PHP_INC_DIR="`$PHP_CONFIG --includes | cut -d" " -f1 | cut -dI -f2`"
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)
@@ -1623,7 +1623,7 @@ fi
# Python checks for mod_python
#
AC_ARG_WITH(
- [python],
+ [python3],
[AS_HELP_STRING([--with-python], [Use system provided version of python (default: try)])],
[with_python="$withval"],
[with_python="try"]
@@ -1642,17 +1642,18 @@ then
AC_MSG_RESULT([$with_python])
AC_SUBST([PYTHON], ["$with_python"])
else
- AC_PATH_PROG([PYTHON], ["python"], ["no"], ["$PATH:/usr/bin:/usr/local/bin"])
+ AC_PATH_PROG([PYTHON], ["python3"], ["no"], ["${STAGING_DIR_HOSTPKG}/bin"])
fi
if test "$PYTHON" != "no" ; then
AC_MSG_CHECKING([python version])
- PYTHON_VER="`$PYTHON -V 2>&1 | cut -d' ' -f2`"
+ PYTHON_VER=`$PYTHON -c "import sys; print('%d.%d' % (sys.version_info[[0]], sys.version_info[[1]]))"`
if test -z "$PYTHON_VER" ; then
AC_MSG_ERROR([Unable to detect python version])
fi
AC_MSG_RESULT([$PYTHON_VER])
+ AC_SUBST([PYTHON_VER], [$PYTHON_VER])
AC_MSG_CHECKING([for python distutils])
python_result="`$PYTHON -c 'import distutils;' 2>&1`"
@@ -1666,12 +1667,12 @@ then
if test "$python_has_distutils" != "no" ; then
AC_MSG_CHECKING([location of site-packages])
- PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
+ if test -d "`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`" ; then
+ PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
- if test -z "$PYTHON_SITE_DIR" ; then
- AC_MSG_ERROR([Unable to detect python site-packages path])
- elif test ! -d "$PYTHON_SITE_DIR" ; then
- AC_MSG_ERROR([Path $PYTHON_SITE_DIR returned by python does not exist!])
+ if test -z "$PYTHON_SITE_DIR" ; then
+ AC_MSG_ERROR([Unable to detect python site-packages path])
+ fi
fi
AC_MSG_RESULT([$PYTHON_SITE_DIR])
AC_SUBST([PYTHON_SITE_DIR], [$PYTHON_SITE_DIR])
@@ -1679,10 +1680,10 @@ then
#
# python distutils found, get settings from python directly
#
- PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));' | sed -e 's/-arch i386//g;s/-arch x86_64//g'`"
+ PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));'`"
PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print(\" \".join(libs));'`"
PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print(\"python\" + sysconfig.get_config_var(\"VERSION\"));'`"
- PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));'`"
+ PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));' | sed -e 's|\(^.*\)/staging_dir/hostpkg|/${STAGING_DIR}/usr|g'`"
# handle python being installed into /usr/local
AC_MSG_CHECKING([python libdir])

View file

@ -1,55 +0,0 @@
--- a/libs/apr/configure.ac
+++ b/libs/apr/configure.ac
@@ -1624,38 +1624,7 @@ if test "$threads" = "1"; then
APR_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h)
AC_CHECK_FUNCS(pthread_mutexattr_setpshared)
AC_CHECK_LIB(pthread, pthread_setschedparam, [AC_DEFINE(HAVE_PTHREAD_SETSCHEDPARAM, 1, [Define if you have pthread_setschedparam()])])
-
- # Some systems have setpshared and define PROCESS_SHARED, but don't
- # really support PROCESS_SHARED locks. So, we must validate that we
- # can go through the steps without receiving some sort of system error.
- # Linux and older versions of AIX have this problem.
- APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED func:pthread_mutexattr_setpshared, [
- AC_CACHE_CHECK([for working PROCESS_SHARED locks], apr_cv_process_shared_works, [
- AC_TRY_RUN([
-#include <sys/types.h>
-#include <pthread.h>
- int main()
- {
- pthread_mutex_t mutex;
- pthread_mutexattr_t attr;
- if (pthread_mutexattr_init(&attr))
- exit(1);
- if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED))
- exit(2);
- if (pthread_mutex_init(&mutex, &attr))
- exit(3);
- if (pthread_mutexattr_destroy(&attr))
- exit(4);
- if (pthread_mutex_destroy(&mutex))
- exit(5);
- exit(0);
- }], [apr_cv_process_shared_works=yes], [apr_cv_process_shared_works=no])])
- # Override detection of pthread_mutexattr_setpshared
- ac_cv_func_pthread_mutexattr_setpshared=$apr_cv_process_shared_works])
-
- if test "$ac_cv_func_pthread_mutexattr_setpshared" = "yes"; then
- APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX
- fi
+ APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX
fi
# See which lock mechanisms we can support on this system.
@@ -1956,7 +1925,11 @@ fi
APR_CHECK_TCP_NODELAY_INHERITED
APR_CHECK_O_NONBLOCK_INHERITED
-APR_CHECK_TCP_NODELAY_WITH_CORK
+
+dnl Check TCP_NODELAY_WITH_CORK ONLY when NOT cross compiling
+if test "$cross_compiling" != yes; then
+ APR_CHECK_TCP_NODELAY_WITH_CORK
+fi
# Look for a way of corking TCP...
APR_CHECK_DEFINE(TCP_CORK, netinet/tcp.h)

View file

@ -1,8 +0,0 @@
--- a/libs/apr-util/configure.gnu
+++ b/libs/apr-util/configure.gnu
@@ -1,4 +1,4 @@
#! /bin/sh
srcpath=$(dirname $0 2>/dev/null ) || srcpath="."
-$srcpath/configure "$@" --with-apr=../apr --disable-shared --with-pic --without-sqlite2 --without-sqlite3 --with-expat=builtin
+$srcpath/configure "$@" --with-apr=../apr --disable-shared --with-expat=builtin

View file

@ -1,13 +0,0 @@
--- a/libs/srtp/configure.ac
+++ b/libs/srtp/configure.ac
@@ -130,10 +130,6 @@ 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 Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(stdlib.h)

View file

@ -1,14 +0,0 @@
--- a/src/mod/applications/mod_http_cache/conf/autoload_configs/http_cache.conf.xml
+++ b/src/mod/applications/mod_http_cache/conf/autoload_configs/http_cache.conf.xml
@@ -9,9 +9,9 @@
<param name="ssl-verifyhost" value="true"/>
<param name="ssl-verifypeer" value="true"/>
<!-- default is 300 seconds, override here -->
- <!--param name="connect-timeout" value="300"/-->
+ <!-- param name="connect-timeout" value="300"/> -->
<!-- default is 300 seconds, override here -->
- <!--param name="download-timeout" value="300"/-->
+ <!--param name="download-timeout" value="300"/> -->
</settings>
<profiles>

View file

@ -1,11 +0,0 @@
--- a/src/mod/endpoints/mod_sofia/conf/sofia.conf.xml
+++ b/src/mod/endpoints/mod_sofia/conf/sofia.conf.xml
@@ -216,7 +216,7 @@
<!-- <param name="unregister-on-options-fail" value="true"/> -->
<!-- Send an OPTIONS packet to all registered endpoints -->
<!--<param name="all-reg-options-ping" value="true"/>-->
- <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only
+ <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only -->
<!--<param name="nat-options-ping" value="true"/>-->
<!-- TLS: disabled by default, set to "true" to enable -->

View file

@ -1,28 +0,0 @@
--- 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 = /usr/lib/perl5/@PERL_VERSION@/CORE
+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:

View file

@ -1,49 +0,0 @@
--- a/src/mod/languages/mod_perl/Makefile.am
+++ b/src/mod/languages/mod_perl/Makefile.am
@@ -1,29 +1,27 @@
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 = /usr/lib/perl5/@PERL_VERSION@/CORE
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 = $(SWITCH_AM_CFLAGS)
-mod_perl_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS)
-mod_perl_la_CPPFLAGS = -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
+mod_perl_la_CFLAGS = $(SWITCH_AM_CFLAGS) @PERL_INC@
+mod_perl_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS) @PERL_INC@
+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_LDFLAGS@ @PERL_LIBS@
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 = $(SWITCH_AM_CPPFLAGS) -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
+freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
+
reswig: swigclean mod_perl_wrap.cpp
swigclean: clean
rm -f mod_perl_wrap.* freeswitch.so freeswitch.pm
mod_perl_wrap.cpp:
- swig2.0 -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
+ ${STAGING_DIR_HOSTPKG}/bin/swig -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
echo "#include \"mod_perl_extra.c\"" >> mod_perl_wrap.cpp
patch -s -p0 -i hack.diff
@@ -31,7 +29,7 @@ orig: mod_perl_wrap.cpp
patch -R -s -p0 -i hack.diff
.perlok:
- @(${PERL} -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
+ @(@PERL@ -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
|| ((echo Sorry, you need to compile perl with threads and multiplicity.&& exit 1))
@touch .perlok

View file

@ -1,20 +0,0 @@
--- a/src/mod/languages/mod_python/Makefile.am
+++ b/src/mod/languages/mod_python/Makefile.am
@@ -2,7 +2,7 @@ include $(top_srcdir)/build/modmake.rule
MODNAME=mod_python
PYMOD=freeswitch
-PYTHON_SITE_DIR=@PYTHON_SITE_DIR@
+PYTHON_SITE_DIR=/usr/lib/python@PYTHON_VER@/site-packages
SWIGCFILE=../../../switch_swig.c
SWIGIFILE=../../../switch_swig.i
@@ -20,7 +20,7 @@ swigclean: clean
rm -f mod_python_wrap.* freeswitch.py
mod_python_wrap.cpp: mod_python_extra.c hack.diff
- swig2.0 -python -c++ -I../../../../src/include -oh mod_python_wrap.h -o mod_python_wrap.cpp mod_python.i
+ ${STAGING_DIR_HOSTPKG}/bin/swig -python -c++ -I../../../../src/include -oh mod_python_wrap.h -o mod_python_wrap.cpp mod_python.i
echo "#include \"mod_python_extra.c\"" >> mod_python_wrap.cpp
patch -s -p0 -i hack.diff

View file

@ -1,15 +0,0 @@
--- a/src/mod/languages/mod_python/freeswitch_python.cpp
+++ b/src/mod/languages/mod_python/freeswitch_python.cpp
@@ -319,7 +319,12 @@ switch_status_t Session::run_dtmf_callba
}
if ((pyresult = PyEval_CallObject(cb_function, arglist))) {
+#if PY_MAJOR_VERSION < 3
str = (char *) PyString_AsString(pyresult);
+#else
+ //str = (char *) pyresult->encode('UTF-8');
+ str = (char *) PyUnicode_AsUnicode(pyresult);
+#endif
} else {
PyErr_Print();
}