-SUBDIRS = src tools doc pkgconfig
+SUBDIRS = src
EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp jrtplib.vcproj \
jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln
RTP_ENDIAN = @RTP_ENDIAN@
RTP_FILIO = @RTP_FILIO@
RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@
+RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@
RTP_LINKLIBS = @RTP_LINKLIBS@
RTP_SOCKIO = @RTP_SOCKIO@
RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-SUBDIRS = src tools doc pkgconfig
+SUBDIRS = src
EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp jrtplib.vcproj \
jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL RTP_FILIO RTP_SOCKIO RTP_ENDIAN RTP_SOCKLENTYPE_UINT RTP_HAVE_SOCKADDR_LEN RTP_SUPPORT_IPV4MULTICAST RTP_SUPPORT_THREAD RTP_SUPPORT_SDESPRIV RTP_SUPPORT_INLINETEMPLATEPARAM RTP_SUPPORT_PROBATION RTP_SUPPORT_GNUDRAND RTP_SUPPORT_RANDR RTP_SUPPORT_GETLOGINR RTP_SUPPORT_IPV6 RTP_SUPPORT_IPV6MULTICAST RTP_SUPPORT_IFADDRS RTP_LINKLIBS LIBOBJS LTLIBOBJS IS64BITLINUX_TRUE IS64BITLINUX_FALSE'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL IS64BITLINUX_TRUE IS64BITLINUX_FALSE RTP_FILIO RTP_SOCKIO RTP_ENDIAN RTP_SOCKLENTYPE_UINT RTP_JTHREADINCLUDES RTP_HAVE_SOCKADDR_LEN RTP_SUPPORT_IPV4MULTICAST RTP_SUPPORT_THREAD RTP_SUPPORT_SDESPRIV RTP_SUPPORT_INLINETEMPLATEPARAM RTP_SUPPORT_PROBATION RTP_SUPPORT_GNUDRAND RTP_SUPPORT_RANDR RTP_SUPPORT_GETLOGINR RTP_SUPPORT_IPV6 RTP_SUPPORT_IPV6MULTICAST RTP_SUPPORT_IFADDRS RTP_LINKLIBS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-sdespriv Disable support for SDES PRIV items
--disable-probation Disable support for probation of a new source
+ --disable-jthread Disable support for JThread
--disable-IPv6 Disable support for IPv6
Optional Packages:
both]
--with-tags[=TAGS]
include additional configurations [automatic]
+ --with-jthread-includes Directory where JThread include files are located
Some influential environment variables:
CC C compiler command
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3677 "configure"' > conftest.$ac_ext
+ echo '#line 3679 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
# Provide some information about the compiler.
-echo "$as_me:5256:" \
+echo "$as_me:5258:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6354: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6356: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6358: \$? = $ac_status" >&5
+ echo "$as_me:6360: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6616: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6618: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6620: \$? = $ac_status" >&5
+ echo "$as_me:6622: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6678: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6680: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6682: \$? = $ac_status" >&5
+ echo "$as_me:6684: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8926 "configure"
+#line 8928 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9024 "configure"
+#line 9026 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11279: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11281: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11283: \$? = $ac_status" >&5
+ echo "$as_me:11285: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11341: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11343: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11345: \$? = $ac_status" >&5
+ echo "$as_me:11347: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 12718 "configure"
+#line 12720 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 12816 "configure"
+#line 12818 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13701: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13703: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13705: \$? = $ac_status" >&5
+ echo "$as_me:13707: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13763: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13765: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13767: \$? = $ac_status" >&5
+ echo "$as_me:13769: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15893: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15895: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15897: \$? = $ac_status" >&5
+ echo "$as_me:15899: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16155: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16157: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16159: \$? = $ac_status" >&5
+ echo "$as_me:16161: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16217: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16219: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16221: \$? = $ac_status" >&5
+ echo "$as_me:16223: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 18465 "configure"
+#line 18467 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 18563 "configure"
+#line 18565 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
fi
-RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD"
-RTP_LINKLIBS="$RTP_LINKLIBS -lpthread"
+# Check whether --enable-jthread or --disable-jthread was given.
+if test "${enable_jthread+set}" = set; then
+ enableval="$enable_jthread"
+
+ if test "$enableval" = yes ; then
+ checkjthread="yes"
+ else
+ checkjthread="no"
+ fi
+else
+
+ checkjthread="yes"
+
+fi;
+
+if test "$checkjthread" = "yes" ; then
+ searchdirs="/usr/include/jthread /usr/local/include/jthread"
+
+ echo "$as_me:$LINENO: checking for JThread include files" >&5
+echo $ECHO_N "checking for JThread include files... $ECHO_C" >&6
+
+# Check whether --with-jthread-includes or --without-jthread-includes was given.
+if test "${with_jthread_includes+set}" = set; then
+ withval="$with_jthread_includes"
+
+ if test -e "$withval"/jthread.h && test -e "$withval"/jmutex.h ; then
+ echo "$as_me:$LINENO: result: in \"$withval\"" >&5
+echo "${ECHO_T}in \"$withval\"" >&6
+ echo "$as_me:$LINENO: checking JThread version" >&5
+echo $ECHO_N "checking JThread version... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+
+ #include "$withval/jthread.h"
+ class MyThread : public JThread
+ {
+ public:
+ void *Thread() { JThread::ThreadStarted(); return 0; }
+ };
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ RTP_JTHREADINCLUDES="-I $withval"
+ RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD"
+ RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread"
+ echo "$as_me:$LINENO: result: >= 1.1.0" >&5
+echo "${ECHO_T}>= 1.1.0" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ echo "$as_me:$LINENO: result: < 1.1.0" >&5
+echo "${ECHO_T}< 1.1.0" >&6
+ { echo "$as_me:$LINENO: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&5
+echo "$as_me: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&2;}
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ else
+ echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6
+ { echo "$as_me:$LINENO: WARNING: The JThread include files were not found in $withval. Support for JThread has been disabled" >&5
+echo "$as_me: WARNING: The JThread include files were not found in $withval. Support for JThread has been disabled" >&2;}
+ fi
+
+else
+
+ for i in $searchdirs ; do
+ if test -e $i/jthread.h && test -e $i/jmutex.h ; then
+ RTP_JTHREADINCLUDEDIR="$i"
+ echo "$as_me:$LINENO: result: $i" >&5
+echo "${ECHO_T}$i" >&6
+ break
+ fi
+ done
+ if test "BLAAI$RTP_JTHREADINCLUDEDIR" = "BLAAI" ; then
+ echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6
+ { echo "$as_me:$LINENO: WARNING: Unable to locate the JThread include files. Please specify the include path with --with-jthread-includes if they exist on your system. JThread support has been disabled" >&5
+echo "$as_me: WARNING: Unable to locate the JThread include files. Please specify the include path with --with-jthread-includes if they exist on your system. JThread support has been disabled" >&2;}
+ else
+ echo "$as_me:$LINENO: checking JThread version" >&5
+echo $ECHO_N "checking JThread version... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+
+ #include "$RTP_JTHREADINCLUDEDIR/jthread.h"
+ class MyThread : public JThread
+ {
+ public:
+ void *Thread() { JThread::ThreadStarted(); return 0; }
+ };
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR"
+ RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD"
+ RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread"
+ echo "$as_me:$LINENO: result: >= 1.1.0" >&5
+echo "${ECHO_T}>= 1.1.0" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ echo "$as_me:$LINENO: result: < 1.1.0" >&5
+echo "${ECHO_T}< 1.1.0" >&6
+ { echo "$as_me:$LINENO: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&5
+echo "$as_me: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&2;}
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+fi;
+fi
+if test `uname -m` = x86_64; then
+ IS64BITLINUX_TRUE=
+ IS64BITLINUX_FALSE='#'
+else
+ IS64BITLINUX_TRUE='#'
+ IS64BITLINUX_FALSE=
+fi
+
+
- ac_config_files="$ac_config_files Makefile src/Makefile src/rtpconfig_unix.h doc/Makefile tools/Makefile pkgconfig/Makefile pkgconfig/jrtplib.pc pkgconfig/jrtplib-uninstalled.pc"
+
+
+ ac_config_files="$ac_config_files Makefile src/Makefile src/rtpconfig_unix.h doc/Makefile tools/Makefile examples/Makefile pkgconfig/Makefile pkgconfig/jrtplib.pc pkgconfig/jrtplib-uninstalled.pc"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${IS64BITLINUX_TRUE}" && test -z "${IS64BITLINUX_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"IS64BITLINUX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"IS64BITLINUX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
"src/rtpconfig_unix.h" ) CONFIG_FILES="$CONFIG_FILES src/rtpconfig_unix.h" ;;
"doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
+ "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
"pkgconfig/Makefile" ) CONFIG_FILES="$CONFIG_FILES pkgconfig/Makefile" ;;
"pkgconfig/jrtplib.pc" ) CONFIG_FILES="$CONFIG_FILES pkgconfig/jrtplib.pc" ;;
"pkgconfig/jrtplib-uninstalled.pc" ) CONFIG_FILES="$CONFIG_FILES pkgconfig/jrtplib-uninstalled.pc" ;;
s,@FFLAGS@,$FFLAGS,;t t
s,@ac_ct_F77@,$ac_ct_F77,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
+s,@IS64BITLINUX_TRUE@,$IS64BITLINUX_TRUE,;t t
+s,@IS64BITLINUX_FALSE@,$IS64BITLINUX_FALSE,;t t
s,@RTP_FILIO@,$RTP_FILIO,;t t
s,@RTP_SOCKIO@,$RTP_SOCKIO,;t t
s,@RTP_ENDIAN@,$RTP_ENDIAN,;t t
s,@RTP_SOCKLENTYPE_UINT@,$RTP_SOCKLENTYPE_UINT,;t t
+s,@RTP_JTHREADINCLUDES@,$RTP_JTHREADINCLUDES,;t t
s,@RTP_HAVE_SOCKADDR_LEN@,$RTP_HAVE_SOCKADDR_LEN,;t t
s,@RTP_SUPPORT_IPV4MULTICAST@,$RTP_SUPPORT_IPV4MULTICAST,;t t
s,@RTP_SUPPORT_THREAD@,$RTP_SUPPORT_THREAD,;t t
-
-
-if test `uname -m` = x86_64; then
- IS64BITLINUX_TRUE=
- IS64BITLINUX_FALSE='#'
-else
- IS64BITLINUX_TRUE='#'
- IS64BITLINUX_FALSE=
-fi
-
dnl Check for the jthread headers
dnl ---------------------------------------------------------------------------
-RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD"
-RTP_LINKLIBS="$RTP_LINKLIBS -lpthread"
+AC_ARG_ENABLE(jthread,[ --disable-jthread Disable support for JThread],[
+ if test "$enableval" = yes ; then
+ checkjthread="yes"
+ else
+ checkjthread="no"
+ fi],[
+ checkjthread="yes"
+ ])
+
+if test "$checkjthread" = "yes" ; then
+ searchdirs="/usr/include/jthread /usr/local/include/jthread"
+
+ AC_MSG_CHECKING(for JThread include files)
+ AC_ARG_WITH(jthread-includes,[ --with-jthread-includes Directory where JThread include files are located],
+ [
+ if test -e "$withval"/jthread.h && test -e "$withval"/jmutex.h ; then
+ AC_MSG_RESULT(in "$withval")
+ AC_MSG_CHECKING(JThread version)
+ AC_COMPILE_IFELSE([
+ #include "$withval/jthread.h"
+ class MyThread : public JThread
+ {
+ public:
+ void *Thread() { JThread::ThreadStarted(); return 0; }
+ };],[
+ RTP_JTHREADINCLUDES="-I $withval"
+ RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD"
+ RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread"
+ AC_MSG_RESULT(>= 1.1.0) ],[
+ AC_MSG_RESULT(< 1.1.0)
+ AC_MSG_WARN(You need at least JThread version 1.1.0. Support for JThread has been disabled)])
+ else
+ AC_MSG_RESULT(not found)
+ AC_MSG_WARN(The JThread include files were not found in $withval. Support for JThread has been disabled)
+ fi
+ ],
+ [
+ for i in $searchdirs ; do
+ if test -e $i/jthread.h && test -e $i/jmutex.h ; then
+ RTP_JTHREADINCLUDEDIR="$i"
+ AC_MSG_RESULT($i)
+ break
+ fi
+ done
+ if test "BLAAI$RTP_JTHREADINCLUDEDIR" = "BLAAI" ; then
+ AC_MSG_RESULT(not found)
+ AC_MSG_WARN(Unable to locate the JThread include files. Please specify the include path with --with-jthread-includes if they exist on your system. JThread support has been disabled)
+ else
+ AC_MSG_CHECKING(JThread version)
+ AC_COMPILE_IFELSE([
+ #include "$RTP_JTHREADINCLUDEDIR/jthread.h"
+ class MyThread : public JThread
+ {
+ public:
+ void *Thread() { JThread::ThreadStarted(); return 0; }
+ };],[
+ RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR"
+ RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD"
+ RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread"
+ AC_MSG_RESULT(>= 1.1.0) ],[
+ AC_MSG_RESULT(< 1.1.0)
+ AC_MSG_WARN(You need at least JThread version 1.1.0. Support for JThread has been disabled)])
+ fi
+ ])
+fi
dnl ---------------------------------------------------------------------------
dnl Check if sys/filio.h exists (used on solaris)
dnl ---------------------------------------------------------------------------
dnl Finish up...
dnl ---------------------------------------------------------------------------
+AM_CONDITIONAL(IS64BITLINUX, [test `uname -m` = x86_64])
AC_SUBST(RTP_FILIO)
AC_SUBST(RTP_SOCKIO)
AC_SUBST(RTP_ENDIAN)
AC_SUBST(RTP_SOCKLENTYPE_UINT)
+AC_SUBST(RTP_JTHREADINCLUDES)
AC_SUBST(RTP_HAVE_SOCKADDR_LEN)
AC_SUBST(RTP_SUPPORT_IPV4MULTICAST)
AC_SUBST(RTP_SUPPORT_THREAD)
src/rtpconfig_unix.h \
doc/Makefile \
tools/Makefile \
+ examples/Makefile \
pkgconfig/Makefile \
pkgconfig/jrtplib.pc \
pkgconfig/jrtplib-uninstalled.pc \
)
-AM_CONDITIONAL(IS64BITLINUX, [test `uname -m` = x86_64])
RTP_ENDIAN = @RTP_ENDIAN@
RTP_FILIO = @RTP_FILIO@
RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@
+RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@
RTP_LINKLIBS = @RTP_LINKLIBS@
RTP_SOCKIO = @RTP_SOCKIO@
RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /nfs/temp/jrtplib/missing --run aclocal-1.9
+ACLOCAL = ${SHELL} /usr/src/freeswitch.trunk/libs/jrtplib/missing --run aclocal-1.9
AMDEP_FALSE = #
AMDEP_TRUE =
-AMTAR = ${SHELL} /nfs/temp/jrtplib/missing --run tar
+AMTAR = ${SHELL} /usr/src/freeswitch.trunk/libs/jrtplib/missing --run tar
AR = ar
-AUTOCONF = ${SHELL} /nfs/temp/jrtplib/missing --run autoconf
-AUTOHEADER = ${SHELL} /nfs/temp/jrtplib/missing --run autoheader
-AUTOMAKE = ${SHELL} /nfs/temp/jrtplib/missing --run automake-1.9
+AUTOCONF = ${SHELL} /usr/src/freeswitch.trunk/libs/jrtplib/missing --run autoconf
+AUTOHEADER = ${SHELL} /usr/src/freeswitch.trunk/libs/jrtplib/missing --run autoheader
+AUTOMAKE = ${SHELL} /usr/src/freeswitch.trunk/libs/jrtplib/missing --run automake-1.9
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
-CXXFLAGS = -O2
+CXXFLAGS = -g
CYGPATH_W = echo
-DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"jrtplib\" -DVERSION=\"3.3.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
+DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"jrtplib\" -DVERSION=\"3.5.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
DEPDIR = .deps
ECHO = echo
ECHO_C =
EXEEXT =
F77 =
FFLAGS =
-GST_CFLAGS =
-GST_LIBS =
-GST_PLUGINS_BASE_CFLAGS =
-GST_PLUGINS_BASE_LIBS =
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+IS64BITLINUX_FALSE =
+IS64BITLINUX_TRUE = #
LDFLAGS =
LIBOBJS =
LIBS =
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
-MAKEINFO = ${SHELL} /nfs/temp/jrtplib/missing --run makeinfo
+MAKEINFO = ${SHELL} /usr/src/freeswitch.trunk/libs/jrtplib/missing --run makeinfo
OBJEXT = o
PACKAGE = jrtplib
PACKAGE_BUGREPORT =
PACKAGE_TARNAME =
PACKAGE_VERSION =
PATH_SEPARATOR = :
-PKG_CONFIG = /usr/bin/pkg-config
RANLIB = ranlib
RTP_ENDIAN = // Little endian system
RTP_FILIO = // Don't have <sys/filio.h>
-RTP_GSTINCLUDES =
RTP_HAVE_SOCKADDR_LEN = // No sa_len member in struct sockaddr
-RTP_LINKLIBS = -lpthread
+RTP_JTHREADINCLUDES =
+RTP_LINKLIBS =
RTP_SOCKIO = // Don't have <sys/sockio.h>
RTP_SOCKLENTYPE_UINT = #define RTP_SOCKLENTYPE_UINT
RTP_SUPPORT_GETLOGINR = #define RTP_SUPPORT_GETLOGINR
RTP_SUPPORT_GNUDRAND = #define RTP_SUPPORT_GNUDRAND
-RTP_SUPPORT_GST = // No GStreamer support
RTP_SUPPORT_IFADDRS = #define RTP_SUPPORT_IFADDRS
-RTP_SUPPORT_INLINETEMPLATEPARAM = #define RTP_SUPPORT_INLINETEMPLATEPARAM
+RTP_SUPPORT_INLINETEMPLATEPARAM =
RTP_SUPPORT_IPV4MULTICAST = #define RTP_SUPPORT_IPV4MULTICAST
RTP_SUPPORT_IPV6 = // No IPv6 support
RTP_SUPPORT_IPV6MULTICAST = // No IPv6 multicasting support
RTP_SUPPORT_PROBATION = #define RTP_SUPPORT_PROBATION
RTP_SUPPORT_RANDR = // Not using rand_r
RTP_SUPPORT_SDESPRIV = #define RTP_SUPPORT_SDESPRIV
-RTP_SUPPORT_THREAD = #define RTP_SUPPORT_THREAD
+RTP_SUPPORT_THREAD = // No support for jthread
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
-VERSION = 3.3.0
+VERSION = 3.5.2
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_F77 =
ac_ct_RANLIB = ranlib
ac_ct_STRIP = strip
-ac_pt_PKG_CONFIG = /usr/bin/pkg-config
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__fastdepCXX_FALSE = #
host_vendor = pc
includedir = ${prefix}/include
infodir = ${prefix}/info
-install_sh = /nfs/temp/jrtplib/install-sh
+install_sh = /usr/src/freeswitch.trunk/libs/jrtplib/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
mkdir_p = mkdir -p --
oldincludedir = /usr/include
-prefix = /usr/local
+prefix = /usr/local/freeswitch
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
example2_SOURCES = example2.cpp
example3_SOURCES = example3.cpp
example4_SOURCES = example4.cpp
-INCLUDES = @RTP_JTHREADINCLUDES@ -I ../src/
-LDADD = ../src/.libs/libjrtp.a -lpthread
+INCLUDES = -I ../src/
+LDADD = ../src/.libs/libjrtp.a
all: all-am
.SUFFIXES:
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IS64BITLINUX_FALSE = @IS64BITLINUX_FALSE@
+IS64BITLINUX_TRUE = @IS64BITLINUX_TRUE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
RTP_ENDIAN = @RTP_ENDIAN@
RTP_FILIO = @RTP_FILIO@
RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@
+RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@
RTP_LINKLIBS = @RTP_LINKLIBS@
RTP_SOCKIO = @RTP_SOCKIO@
RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
RTP_ENDIAN = @RTP_ENDIAN@
RTP_FILIO = @RTP_FILIO@
RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@
+RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@
RTP_LINKLIBS = @RTP_LINKLIBS@
RTP_SOCKIO = @RTP_SOCKIO@
RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@
rtprandom.cpp rtcpscheduler.cpp \
rtcppacketbuilder.cpp rtpsessionsources.cpp \
rtpcollisionlist.cpp rtpipv6address.cpp \
- rtpudpv6transmitter.cpp rtptimeutilities.cpp \
- pthread/jmutex.cpp pthread/jthread.cpp
+ rtpudpv6transmitter.cpp rtptimeutilities.cpp
libjrtp_la_LDFLAGS = -release 3.5.2 @RTP_LINKLIBS@
libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \
rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \
rtptypes_win.h rtpudpv4transmitter.h rtpsessionsources.h \
rtpcollisionlist.h rtpipv6address.h rtpipv6destination.h \
rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h \
- jmutex.h jthread.h jrtp4c.h jmutexautolock.h
-EXTRA_DIST = rtpconfig_unix.h.in win32/jthread.cpp win32/jmutex.cpp
+ jrtp4c.h
+EXTRA_DIST = rtpconfig_unix.h.in
libjrtpincludedir = ${includedir}/jrtplib3
rtcppacket.lo rtcpcompoundpacketbuilder.lo rtprandom.lo \
rtcpscheduler.lo rtcppacketbuilder.lo rtpsessionsources.lo \
rtpcollisionlist.lo rtpipv6address.lo rtpudpv6transmitter.lo \
- rtptimeutilities.lo jmutex.lo jthread.lo
+ rtptimeutilities.lo
libjrtp_la_OBJECTS = $(am_libjrtp_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
RTP_ENDIAN = @RTP_ENDIAN@
RTP_FILIO = @RTP_FILIO@
RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@
+RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@
RTP_LINKLIBS = @RTP_LINKLIBS@
RTP_SOCKIO = @RTP_SOCKIO@
RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@
rtprandom.cpp rtcpscheduler.cpp \
rtcppacketbuilder.cpp rtpsessionsources.cpp \
rtpcollisionlist.cpp rtpipv6address.cpp \
- rtpudpv6transmitter.cpp rtptimeutilities.cpp \
- pthread/jmutex.cpp pthread/jthread.cpp
+ rtpudpv6transmitter.cpp rtptimeutilities.cpp
libjrtp_la_LDFLAGS = -release 3.5.2 @RTP_LINKLIBS@
libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \
rtptypes_win.h rtpudpv4transmitter.h rtpsessionsources.h \
rtpcollisionlist.h rtpipv6address.h rtpipv6destination.h \
rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h \
- jmutex.h jthread.h jrtp4c.h jmutexautolock.h
+ jrtp4c.h
-EXTRA_DIST = rtpconfig_unix.h.in win32/jthread.cpp win32/jmutex.cpp
+EXTRA_DIST = rtpconfig_unix.h.in
libjrtpincludedir = ${includedir}/jrtplib3
all: all-am
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jmutex.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jrtp4c.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jthread.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcpapppacket.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcpbyepacket.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcpcompoundpacket.Plo@am__quote@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
-jmutex.lo: pthread/jmutex.cpp
-@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT jmutex.lo -MD -MP -MF "$(DEPDIR)/jmutex.Tpo" -c -o jmutex.lo `test -f 'pthread/jmutex.cpp' || echo '$(srcdir)/'`pthread/jmutex.cpp; \
-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/jmutex.Tpo" "$(DEPDIR)/jmutex.Plo"; else rm -f "$(DEPDIR)/jmutex.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pthread/jmutex.cpp' object='jmutex.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o jmutex.lo `test -f 'pthread/jmutex.cpp' || echo '$(srcdir)/'`pthread/jmutex.cpp
-
-jthread.lo: pthread/jthread.cpp
-@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT jthread.lo -MD -MP -MF "$(DEPDIR)/jthread.Tpo" -c -o jthread.lo `test -f 'pthread/jthread.cpp' || echo '$(srcdir)/'`pthread/jthread.cpp; \
-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/jthread.Tpo" "$(DEPDIR)/jthread.Plo"; else rm -f "$(DEPDIR)/jthread.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pthread/jthread.cpp' object='jthread.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o jthread.lo `test -f 'pthread/jthread.cpp' || echo '$(srcdir)/'`pthread/jthread.cpp
-
mostlyclean-libtool:
-rm -f *.lo
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- $(mkdir_p) $(distdir)/win32
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
struct jrtp4c;
class JRTP4C: public RTPSession {
- // add virtuals later
public:
JRTP4C(): RTPSession() { }
void OnInvalidRawPacketType(RTPRawPacket *rawpacket, jrtp_socket_t socket);
struct jrtp4c *myjrtp4c;
};
+typedef enum {
+ JF_READY = ( 1 << 0),
+ JF_RUNNING = ( 1 << 1),
+ JF_READ = (1 << 2),
+ JF_WRITE = (1 << 3)
+} jrtp4cflags;
+
struct jrtp4c {
JRTP4C *session;
RTPUDPv4TransmissionParams *transparams;
int payload;
invalid_handler on_invalid;
void *private_data;
+ uint32_t flags;
};
void JRTP4C::OnInvalidRawPacketType(RTPRawPacket *rawpacket, jrtp_socket_t socket)
jrtp4c->session->SetDefaultPayloadType(payload);
jrtp4c->payload = payload;
jrtp4c->session->myjrtp4c = jrtp4c;
+
+ jrtp4c->flags |= JF_READY;
+
return jrtp4c;
}
void jrtp4c_destroy(struct jrtp4c **jrtp4c)
{
+ jrtp4c_killread(*jrtp4c);
+
+ while (((*jrtp4c)->flags & JF_READ) || ((*jrtp4c)->flags & JF_WRITE)) {
+ usleep(1000);
+ sched_yield();
+ };
+
(*jrtp4c)->session->BYEDestroy(RTPTime(10,0),0,0);
delete (*jrtp4c)->session;
delete (*jrtp4c)->transparams;
jrtp_socket_t jrtp4c_get_rtp_socket(struct jrtp4c *jrtp4c)
{
-
+ if (!jrtp4c->flags & JF_READY) {
+ return -1;
+ }
return jrtp4c->session->GetRTPSocket();
}
void jrtp4c_killread(struct jrtp4c *jrtp4c)
{
+
+ jrtp4c->flags &= ~JF_READY;
jrtp4c->session->AbortWait();
}
int jrtp4c_read(struct jrtp4c *jrtp4c, void *data, int datalen, int *payload_type)
{
- RTPPacket *pack;
- int slen = 0;
+ RTPPacket *pack = NULL;
+ int status, slen = 0;
bool hasdata = 0;
- *payload_type = 0;
+ *payload_type = -1;
+
+ if (!(jrtp4c->flags & JF_READY)) {
+ return -1;
+ }
+
+ jrtp4c->flags |= JF_READ;
+
+ if ((status = jrtp4c->session->Poll()) < 0) {
+ jrtp4c->flags &= ~JF_READ;
+ return status;
+ }
+
+ if (!(jrtp4c->flags & JF_READY)) {
+ jrtp4c->flags &= ~JF_READ;
+ return -1;
+ }
jrtp4c->session->BeginDataAccess();
+ //jrtp4c->session->WaitForIncomingData(RTPTime(.5), &hasdata);
- jrtp4c->session->WaitForIncomingData(RTPTime(.5), &hasdata);
+ /*
+ if (!(jrtp4c->flags & JF_READY)) {
+ jrtp4c->session->EndDataAccess();
+ jrtp4c->flags &= ~JF_READ;
+ return -1;
+ }
+
+ if (!hasdata) {
+ jrtp4c->session->EndDataAccess();
+ jrtp4c->flags &= ~JF_READ;
+ return 0;
+ }
+ */
if (!jrtp4c->session->GotoFirstSourceWithData()) {
jrtp4c->session->EndDataAccess();
+ jrtp4c->flags &= ~JF_READ;
return 0;
}
slen = datalen;
}
-
*payload_type = pack->GetPayloadType();
memcpy(data, pack->GetPayloadData(), slen);
delete pack;
}
jrtp4c->session->EndDataAccess();
-
+ jrtp4c->flags &= ~JF_READ;
return slen;
}
int jrtp4c_write(struct jrtp4c *jrtp4c, void *data, int datalen, uint32_t ts)
{
- return jrtp4c->session->SendPacket(data, datalen, jrtp4c->payload, false, ts);
+ int ret;
+
+ if (!(jrtp4c->flags & JF_READY)) {
+ return -1;
+ }
+
+ jrtp4c->flags |= JF_WRITE;
+ ret = jrtp4c->session->SendPacket(data, datalen, jrtp4c->payload, false, ts);
+ jrtp4c->flags &= ~JF_WRITE;
+
+ return ret;
}
int jrtp4c_write_payload(struct jrtp4c *jrtp4c, void *data, int datalen, int payload, uint32_t ts, uint32_t mseq)
{
- return jrtp4c->session->SendPacket(data, datalen, payload, false, ts, mseq);
+ int ret;
+
+ if (!(jrtp4c->flags & JF_READY)) {
+ return -1;
+ }
+
+ jrtp4c->flags |= JF_WRITE;
+ ret = jrtp4c->session->SendPacket(data, datalen, payload, false, ts, mseq);
+ jrtp4c->flags &= ~JF_WRITE;
+
+ return ret;
}
uint32_t jrtp4c_start(struct jrtp4c *jrtp4c)
{
- //jrtp4c->session->BeginDataAccess();
+ jrtp4c->flags |= JF_RUNNING;
return 0;
}
uint32_t jrtp4c_get_ssrc(struct jrtp4c *jrtp4c)
{
+ if (!(jrtp4c->flags & JF_READY)) {
+ return -1;
+ }
return jrtp4c->ssrc;
}
RTP_ENDIAN = @RTP_ENDIAN@
RTP_FILIO = @RTP_FILIO@
RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@
+RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@
RTP_LINKLIBS = @RTP_LINKLIBS@
RTP_SOCKIO = @RTP_SOCKIO@
RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@
typedef struct switch_directories switch_directories;
SWITCH_DECLARE_DATA extern switch_directories SWITCH_GLOBAL_dirs;
-#define SWITCH_RECCOMMENDED_BUFFER_SIZE 131072
+#define SWITCH_RECCOMMENDED_BUFFER_SIZE 2048
#define SWITCH_MAX_CODECS 30
#define SWITCH_MAX_STATE_HANDLERS 30
#define SWITCH_TRUE 1
static const char modname[] = "mod_exosip";
#define STRLEN 15
-static switch_memory_pool *module_pool;
+static switch_memory_pool *module_pool = NULL;
static struct private_object *get_pvt_by_call_id(int id)
{
char name[50];
+ struct private_object *tech_pvt = NULL;
snprintf(name, sizeof(name), "%d", id);
- return (struct private_object *) switch_core_hash_find(globals.call_hash, name);
+ eXosip_lock();
+ tech_pvt = (struct private_object *) switch_core_hash_find(globals.call_hash, name);
+ eXosip_unlock();
+ return tech_pvt;
}
static switch_status exosip_on_execute(switch_core_session *session)
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
+ deactivate_rtp(tech_pvt);
+ eXosip_lock();
switch_core_hash_delete(globals.call_hash, tech_pvt->call_id);
-
-
switch_set_flag(tech_pvt, TFLAG_BYE);
switch_clear_flag(tech_pvt, TFLAG_IO);
- deactivate_rtp(tech_pvt);
-
i = eXosip_call_terminate(tech_pvt->cid, tech_pvt->did);
+ eXosip_unlock();
if (switch_test_flag(tech_pvt, TFLAG_USING_CODEC)) {
switch_core_codec_destroy(&tech_pvt->read_codec);
static void deactivate_rtp(struct private_object *tech_pvt)
{
- int loops = 0;
+ int loops = 0;//, sock = -1;
+
if (tech_pvt->rtp_session) {
switch_mutex_lock(tech_pvt->rtp_lock);
switch_yield(10000);
loops++;
}
-
+ /*
+ if ((sock = jrtp4c_get_rtp_socket(tech_pvt->rtp_session)) > -1) {
+ close(sock);
+ }
+ */
jrtp4c_destroy(&tech_pvt->rtp_session);
tech_pvt->rtp_session = NULL;
switch_mutex_unlock(tech_pvt->rtp_lock);
switch_clear_flag(tech_pvt, TFLAG_IO);
switch_set_flag(tech_pvt, TFLAG_BYE);
+ if (tech_pvt->rtp_session) {
+ jrtp4c_killread(tech_pvt->rtp_session);
+ }
+
return SWITCH_STATUS_SUCCESS;
}
/* Transmit 183 Progress with SDP */
eXosip_lock();
eXosip_call_build_answer(tech_pvt->tid, 183, &progress);
- sdp_message_to_str(tech_pvt->local_sdp, &buf);
- osip_message_set_body(progress, buf, strlen(buf));
- osip_message_set_content_type(progress, "application/sdp");
- free(buf);
- eXosip_call_send_answer(tech_pvt->tid, 183, progress);
+ if (progress) {
+ sdp_message_to_str(tech_pvt->local_sdp, &buf);
+ osip_message_set_body(progress, buf, strlen(buf));
+ osip_message_set_content_type(progress, "application/sdp");
+ free(buf);
+ eXosip_call_send_answer(tech_pvt->tid, 183, progress);
+ switch_set_flag(tech_pvt, TFLAG_EARLY_MEDIA);
+ switch_channel_set_flag(channel, CF_EARLY_MEDIA);
+ }
eXosip_unlock();
- switch_set_flag(tech_pvt, TFLAG_EARLY_MEDIA);
- switch_channel_set_flag(channel, CF_EARLY_MEDIA);
}
}
-
+
break;
default:
break;
return SWITCH_STATUS_TERM;
}
+ switch_mutex_init(&globals.port_lock, SWITCH_MUTEX_NESTED, module_pool);
+ switch_core_hash_init(&globals.call_hash, module_pool);
+
/* connect my internal structure to the blank pointer passed to me */
*interface = &exosip_module_interface;
tech_pvt->remote_sdp_audio_port = atoi(remote_med->m_port);
snprintf(tech_pvt->call_id, sizeof(tech_pvt->call_id), "%d", event->cid);
+ eXosip_lock();
switch_core_hash_insert(globals.call_hash, tech_pvt->call_id, tech_pvt);
+ eXosip_unlock();
if (!dname) {
exosip_on_hangup(session);
char *cf = "exosip.conf";
globals.bytes_per_frame = DEFAULT_BYTES_PER_FRAME;
- switch_core_hash_init(&globals.call_hash, module_pool);
+
if (!switch_config_open_file(&cfg, cf)) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "open of %s failed\n", cf);
set_global_dialplan("default");
}
- switch_mutex_init(&globals.port_lock, SWITCH_MUTEX_NESTED, module_pool);
/* Setup the user agent */
eXosip_set_user_agent("FreeSWITCH");
static const char modname[] = "mod_exosip";
#define STRLEN 15
-static switch_memory_pool *module_pool;
+static switch_memory_pool *module_pool = NULL;
typedef enum {
PFLAG_ANSWER = (1 << 0),
static const char modname[] = "mod_exosip";
#define STRLEN 15
-static switch_memory_pool *module_pool;
+static switch_memory_pool *module_pool = NULL;
typedef enum {
PFLAG_ANSWER = (1 << 0),
static const char modname[] = "mod_iax";
-static switch_memory_pool *module_pool;
+static switch_memory_pool *module_pool = NULL;
static int running = 1;
static const char modname[] = "mod_woomera";
-static switch_memory_pool *module_pool;
+static switch_memory_pool *module_pool = NULL;
typedef enum {
static const char modname[] = "mod_portaudio";
-static switch_memory_pool *module_pool;
+static switch_memory_pool *module_pool = NULL;
//static int running = 1;
#define SAMPLE_TYPE paInt16
static const char modname[] = "mod_wanpipe";
#define STRLEN 15
-static switch_memory_pool *module_pool;
+static switch_memory_pool *module_pool = NULL;
typedef enum {
PFLAG_ANSWER = (1 << 0),
static const char modname[] = "mod_woomera";
-static switch_memory_pool *module_pool;
+static switch_memory_pool *module_pool = NULL;
#define STRLEN 15
#define FRAME_LEN 480
static const char modname[] = "mod_event_multicast";
-static switch_memory_pool *module_pool;
+static switch_memory_pool *module_pool = NULL;
static struct {
char *address;
static const char modname[] = "mod_zeroconf";
-static switch_memory_pool *module_pool;
+static switch_memory_pool *module_pool = NULL;
static struct {
sw_discovery discovery;
static switch_status launch_async(char *text, char *out, size_t outlen)
{
+ if (switch_strlen_zero(text)) {
+ switch_copy_string(out, "INVALID", outlen);
+ return SWITCH_STATUS_SUCCESS;
+ }
+
js_thread_launch(text);
switch_copy_string(out, "OK", outlen);
return SWITCH_STATUS_SUCCESS;
#include <switch.h>
#define CMD_BUFLEN SWITCH_RECCOMMENDED_BUFFER_SIZE * 10
-static int switch_console_process(char *cmd)
+static int switch_console_process(char *cmd, char *retbuf, int retlen)
{
char *arg = NULL;
- char *retbuf = (char *)malloc(CMD_BUFLEN);
-#ifdef EMBED_PERL
- const char *perlhelp = "perl - execute some perl. (print to STDERR if you want to see it.)\n";
-#else
- const char *perlhelp = "";
-#endif
+
if (!strcmp(cmd, "shutdown") || !strcmp(cmd, "...")) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bye!\n");
return 0;
switch_console_printf(SWITCH_CHANNEL_CONSOLE,
"\n"
"Valid Commands:\n\n"
- "version\n" "help - umm yeah..\n" "%sshutdown - stop the program\n\n", perlhelp);
+ "version\n" "help - umm yeah..\n" "shutdown - stop the program\n\n");
return 1;
}
-#ifdef EMBED_PERL
- if (!strncmp(cmd, "perl ", 5)) {
- cmd += 5;
- switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Executing perl code [%s]\n", cmd);
- switch_core_do_perl(cmd);
- return 1;
- }
-#endif
if ((arg = strchr(cmd, '\r')) != 0 || (arg = strchr(cmd, '\n')) != 0 ) {
*arg = '\0';
arg = NULL;
if ((arg = strchr(cmd, ' ')) != 0) {
*arg++ = '\0';
}
- if (switch_api_execute(cmd, arg, retbuf, CMD_BUFLEN) == SWITCH_STATUS_SUCCESS) {
+ if (switch_api_execute(cmd, arg, retbuf, retlen) == SWITCH_STATUS_SUCCESS) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE_CLEAN, "API CALL [%s(%s)] output:\n%s\n", cmd, arg ? arg : "",
retbuf);
} else {
char hostname[256];
char cmd[2048];
int running = 1, x = 0, activity = 1;
+ char *retbuf = (char *)malloc(CMD_BUFLEN);
+
+ assert(retbuf != NULL);
gethostname(hostname, sizeof(hostname));
}
}
if (cmd[0]) {
- running = switch_console_process(cmd);
+ running = switch_console_process(cmd, retbuf, CMD_BUFLEN);
}
}
+
+ free(retbuf);
}
*
*/
#include <switch.h>
-//#define DEBUG_ALLOC
+#define DEBUG_ALLOC
struct switch_core_session {
unsigned long id;
switch_status status = SWITCH_STATUS_FALSE;
int need_codec = 0, perfect = 0;
+ assert(session != NULL);
+ *frame = NULL;
if (session->endpoint_interface->io_routines->read_frame) {
if ((status = session->endpoint_interface->io_routines->read_frame(session,
return status;
}
+ assert(session != NULL);
+ assert(*frame != NULL);
+
/* if you think this code is redundant.... too bad! I like to understand what I'm doing */
if ((session->read_codec && (*frame)->codec
&& session->read_codec->implementation != (*frame)->codec->implementation)) {
unsigned int flag = 0, need_codec = 0, perfect = 0;
switch_io_flag io_flag = SWITCH_IO_FLAG_NOOP;
-
+ assert(session != NULL);
+ assert(frame != NULL);
assert(frame->codec != NULL);
/* if you think this code is redundant.... too bad! I like to understand what I'm doing */
SWITCH_DECLARE(switch_status) switch_core_new_memory_pool(switch_memory_pool **pool)
{
- if (runtime.memory_pool == NULL) {
- return SWITCH_STATUS_MEMERR;
- }
+ assert(runtime.memory_pool != NULL);
- if ((apr_pool_create(pool, NULL)) != SWITCH_STATUS_SUCCESS) {
+ if ((apr_pool_create(pool, runtime.memory_pool)) != SWITCH_STATUS_SUCCESS) {
*pool = NULL;
return SWITCH_STATUS_MEMERR;
}
SWITCH_DECLARE(switch_status) switch_core_hash_init(switch_hash **hash, switch_memory_pool *pool)
{
+ assert(pool != NULL);
+
if ((*hash = apr_hash_make(pool)) != 0) {
return SWITCH_STATUS_SUCCESS;
}
+
return SWITCH_STATUS_GENERR;
}
{
void *ptr = NULL;
assert(pool != NULL);
- assert(memory < 1000000);
#ifdef DEBUG_ALLOC
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Allocate %d\n", memory);
+ //assert(memory < 600000);
#endif
if ((ptr = apr_palloc(pool, memory)) != 0) {
static switch_mutex_t *BLOCK = NULL;
static switch_mutex_t *POOL_LOCK = NULL;
static switch_memory_pool *RUNTIME_POOL = NULL;
-static switch_memory_pool *APOOL = NULL;
-static switch_memory_pool *BPOOL = NULL;
+//static switch_memory_pool *APOOL = NULL;
+//static switch_memory_pool *BPOOL = NULL;
static switch_memory_pool *THRUNTIME_POOL = NULL;
static switch_queue_t *EVENT_QUEUE[3] = {0,0,0};
-static int POOL_COUNT_MAX = 100;
+static int POOL_COUNT_MAX = 2000;
static switch_hash *CUSTOM_HASH = NULL;
static int THREAD_RUNNING = 0;
+#if 0
static void *locked_alloc(size_t len)
{
void *mem;
#define ALLOC(size) locked_alloc(size)
#define DUP(str) locked_dup(str)
+#endif
+#define ALLOC(size) malloc(size)
+#define DUP(str) strdup(str)
+#define FREE(ptr) if (ptr) free(ptr)
/* make sure this is synced with the switch_event_t enum in switch_types.h
also never put any new ones before EVENT_ALL
RUNTIME_POOL = pool;
- if (switch_core_new_memory_pool(&APOOL) != SWITCH_STATUS_SUCCESS) {
+ if (switch_core_new_memory_pool(&THRUNTIME_POOL) != SWITCH_STATUS_SUCCESS) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Could not allocate memory pool\n");
return SWITCH_STATUS_MEMERR;
}
+ /*
if (switch_core_new_memory_pool(&BPOOL) != SWITCH_STATUS_SUCCESS) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Could not allocate memory pool\n");
return SWITCH_STATUS_MEMERR;
}
-
- THRUNTIME_POOL = APOOL;
+ */
+ //THRUNTIME_POOL = APOOL;
switch_queue_create(&EVENT_QUEUE[0], POOL_COUNT_MAX + 10, THRUNTIME_POOL);
switch_queue_create(&EVENT_QUEUE[1], POOL_COUNT_MAX + 10, THRUNTIME_POOL);
switch_queue_create(&EVENT_QUEUE[2], POOL_COUNT_MAX + 10, THRUNTIME_POOL);
if ((*event = ALLOC(sizeof(switch_event))) == 0) {
return SWITCH_STATUS_MEMERR;
}
+ memset(*event, 0, sizeof(switch_event));
(*event)->event_id = event_id;
return SWITCH_STATUS_MEMERR;
}
+ memset(header, 0, sizeof(*header));
+
header->name = DUP(header_name);
header->value = DUP(data);
if (((stack = SWITCH_STACK_TOP)) != 0) {
SWITCH_DECLARE(void) switch_event_destroy(switch_event **event)
{
+ switch_event *ep = *event;
+ switch_event_header *hp, *this;
+
+ for (hp = ep->headers; hp;) {
+ this = hp;
+ FREE(hp->name);
+ FREE(hp->value);
+ hp = hp->next;
+
+ }
+ FREE(ep->body);
+ FREE(ep);
*event = NULL;
}
if ((header = ALLOC(sizeof(*header))) == 0) {
return SWITCH_STATUS_MEMERR;
}
+
+ memset(header, 0, sizeof(*header));
+
header->name = DUP(hp->name);
header->value = DUP(hp->value);
//switch_yield(1000);
}
-
+ data->running = 0;
if (switch_channel_test_flag(chan_a, CF_ORIGINATOR)) {
if (!switch_channel_test_flag(chan_b, CF_TRANSFER)) {
switch_channel_clear_flag(chan_a, CF_ORIGINATOR);
}
- data->running = 0;
-
- if (his_thread->running > 0) {
+ while (his_thread->running > 0) {
his_thread->running = -1;
/* wait for the other audio thread */
- while (his_thread->running) {
+ while (his_thread->running == -1) {
switch_yield(1000);
}
}
- switch_sleep(500000);
+
+ data->running = 0;
+ switch_sleep(200000);
+ data->running = 0;
+
return NULL;
}
switch_channel *caller_channel, *peer_channel;
time_t start;
int stream_id = 0;
- switch_frame *read_frame;
+ switch_frame *read_frame = NULL;
/* read from the channel while we wait if the audio is up on it */
if (switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA)) {
-
if (switch_core_session_read_frame(session, &read_frame, 1000, 0) != SWITCH_STATUS_SUCCESS) {
break;
}
if (err) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Error Loading module %s\n**%s**\n", filename, err);
- apr_dso_unload(dso);
return SWITCH_STATUS_GENERR;
}