diff --git a/Makefile.am b/Makefile.am index 8f345f2ed7..af1f48b2eb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,6 +15,7 @@ endif if ISMAC SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace +AM_CFLAGS += -DMACOSX -DBIGENDIAN else SOLINK=-shared -Xlinker -x endif @@ -84,7 +85,7 @@ freeswitch_LDFLAGS = -static -lfreeswitch modules: $(NAME) @echo making modules - @cd src/mod && for i in $(shell cat modules.conf | grep -v \#) ; do echo making $$i ; SOLINK="$(SOLINK)" LDFLAGS="$(AM_LDFLAGS) -lfreeswitch" CFLAGS="$(AM_CFLAGS)" CC="$(CC)" MOD="$$i" $(PWD)/modmake.sh $(PWD) $$i || exit 1; done + @cd src/mod && for i in $(shell cat modules.conf | grep -v \#) ; do echo making $$i ; OSARCH="$(OSARCH)" SOLINK="$(SOLINK)" LDFLAGS="$(AM_LDFLAGS) -lfreeswitch" CFLAGS="$(AM_CFLAGS)" CC="$(CC)" MOD="$$i" $(PWD)/modmake.sh $(PWD) $$i || exit 1; done modclean: @cd src/mod && for i in [a-z]* ; do echo making clean $$i ; SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CC="$(CC)" MOD="$$i" make -f $(PWD)/generic_mod.mk -C $$i clean || exit 1; done diff --git a/Makefile.in b/Makefile.in index 7b3c15e68a..089fb51db4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -39,6 +39,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @ISLINUX_TRUE@am__append_1 = -Wl,-E +@ISMAC_TRUE@am__append_2 = -DMACOSX -DBIGENDIAN bin_PROGRAMS = freeswitch$(EXEEXT) DIST_COMMON = README $(am__configure_deps) $(library_include_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ @@ -226,8 +227,8 @@ NAME = freeswitch PREFIX = $(prefix)/${NAME} APR_CONFIG = $(prefix)/bin/apr-1-config AM_CFLAGS = $(shell $(APR_CONFIG) --cflags --cppflags --includes) \ - -fPIC -Wall -I$(PWD) -I$(PWD)/src/include -I$(PREFIX)/include \ - -DSWITCH_MOD_DIR=\"$(PREFIX)/mod\" \ + $(am__append_2) -fPIC -Wall -I$(PWD) -I$(PWD)/src/include \ + -I$(PREFIX)/include -DSWITCH_MOD_DIR=\"$(PREFIX)/mod\" \ -DSWITCH_PREFIX_DIR=\"$(PREFIX)\" \ -DSWITCH_CONF_DIR=\"$(PREFIX)/conf\" AM_LDFLAGS = $(shell $(APR_CONFIG) --link-ld --libs ) $(am__append_1) \ @@ -939,7 +940,7 @@ uninstall-info: uninstall-info-recursive modules: $(NAME) @echo making modules - @cd src/mod && for i in $(shell cat modules.conf | grep -v \#) ; do echo making $$i ; SOLINK="$(SOLINK)" LDFLAGS="$(AM_LDFLAGS) -lfreeswitch" CFLAGS="$(AM_CFLAGS)" CC="$(CC)" MOD="$$i" $(PWD)/modmake.sh $(PWD) $$i || exit 1; done + @cd src/mod && for i in $(shell cat modules.conf | grep -v \#) ; do echo making $$i ; OSARCH="$(OSARCH)" SOLINK="$(SOLINK)" LDFLAGS="$(AM_LDFLAGS) -lfreeswitch" CFLAGS="$(AM_CFLAGS)" CC="$(CC)" MOD="$$i" $(PWD)/modmake.sh $(PWD) $$i || exit 1; done modclean: @cd src/mod && for i in [a-z]* ; do echo making clean $$i ; SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CC="$(CC)" MOD="$$i" make -f $(PWD)/generic_mod.mk -C $$i clean || exit 1; done diff --git a/libs/iax/INSTALL b/libs/iax/INSTALL index 095b1eb406..23e5f25d0e 100644 --- a/libs/iax/INSTALL +++ b/libs/iax/INSTALL @@ -1,7 +1,7 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives @@ -102,16 +102,16 @@ for another architecture. Installation Names ================== -By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PREFIX'. +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PREFIX', the package will -use PREFIX as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular @@ -159,7 +159,7 @@ where SYSTEM can have one of these forms: need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will +use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a @@ -189,8 +189,13 @@ them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc -will cause the specified gcc to be used as the C compiler (unless it is -overridden in the site shell script). +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). Here is a another example: + + /bin/bash ./configure CONFIG_SHELL=/bin/bash + +Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent +configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== diff --git a/libs/iax/depcomp b/libs/iax/depcomp index 11e2d3bfe1..04701da536 100755 --- a/libs/iax/depcomp +++ b/libs/iax/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2004-05-31.23 +scriptversion=2005-07-09.11 -# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,8 +17,8 @@ scriptversion=2004-05-31.23 # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -50,11 +50,11 @@ Environment variables: Report bugs to . EOF - exit 0 + exit $? ;; -v | --v*) echo "depcomp $scriptversion" - exit 0 + exit $? ;; esac @@ -287,36 +287,43 @@ tru64) base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then - # Dependencies are output in .lo.d with libtool 1.4. - # With libtool 1.5 they are output both in $dir.libs/$base.o.d - # and in $dir.libs/$base.o.d and $dir$base.o.d. We process the - # latter, because the former will be cleaned when $dir.libs is - # erased. - tmpdepfile1="$dir.libs/$base.lo.d" - tmpdepfile2="$dir$base.o.d" - tmpdepfile3="$dir.libs/$base.d" + # With Tru64 cc, shared objects can also be used to make a + # static library. This mecanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else - tmpdepfile1="$dir$base.o.d" - tmpdepfile2="$dir$base.d" - tmpdepfile3="$dir$base.d" + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi - if test -f "$tmpdepfile1"; then - tmpdepfile="$tmpdepfile1" - elif test -f "$tmpdepfile2"; then - tmpdepfile="$tmpdepfile2" - else - tmpdepfile="$tmpdepfile3" - fi + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. @@ -460,7 +467,8 @@ cpp) done "$@" -E | - sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" diff --git a/libs/iax/install-sh b/libs/iax/install-sh index 6ebe46de6c..4d4a9519ea 100755 --- a/libs/iax/install-sh +++ b/libs/iax/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2004-12-17.09 +scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -109,7 +109,7 @@ while test -n "$1"; do shift continue;; - --help) echo "$usage"; exit 0;; + --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift @@ -134,7 +134,7 @@ while test -n "$1"; do shift continue;; - --version) echo "$0 $scriptversion"; exit 0;; + --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. diff --git a/libs/iax/missing b/libs/iax/missing index 64b5f901dd..894e786e16 100755 --- a/libs/iax/missing +++ b/libs/iax/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2004-09-07.08 +scriptversion=2005-06-08.21 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. @@ -19,8 +19,8 @@ scriptversion=2004-09-07.08 # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -87,12 +87,12 @@ Supported PROGRAM values: yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." - exit 0 + exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" - exit 0 + exit $? ;; -*) @@ -288,11 +288,18 @@ WARNING: \`$1' is $msg. You should only need it if call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 touch $file ;; diff --git a/libs/iax/src/Makefile.in b/libs/iax/src/Makefile.in index 3b5b4419ea..40ea8ec8e6 100644 --- a/libs/iax/src/Makefile.in +++ b/libs/iax/src/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.4 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,8 +14,6 @@ @SET_MAKE@ -SOURCES = $(libiax_la_SOURCES) - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -38,6 +36,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@ISMAC_TRUE@am__append_1 = -DMACOSX subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -108,6 +107,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +ISMAC_FALSE = @ISMAC_FALSE@ +ISMAC_TRUE = @ISMAC_TRUE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -173,7 +174,8 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ # -DDEBUG_DEFAULT AM_CFLAGS = -Wall -O2 -g -Wall -Wstrict-prototypes -I . \ - -DDEBUG_SUPPORT -DLIBIAX -fsigned-char $(UCFLAGS) + -DDEBUG_SUPPORT -DLIBIAX -fsigned-char $(UCFLAGS) \ + $(am__append_1) pkgdir = $(libdir) pkg_LTLIBRARIES = libiax.la libiax_la_SOURCES = iax2-parser.c iax.c md5.c jitterbuf.c diff --git a/modules.conf b/modules.conf index d8ea9a1c3e..b708cb7f41 100644 --- a/modules.conf +++ b/modules.conf @@ -2,15 +2,15 @@ mod_bridgecall mod_dialplan_demo mod_softtimer -#mod_woomerachan +mod_woomerachan mod_playback #mod_wanchan -mod_speexcodec +#mod_speexcodec mod_exosip mod_g711codec mod_rawaudio mod_iaxchan #mod_opalchan -mod_codec_g729 +#mod_codec_g729 mod_event_test -#mod_portaudio +mod_portaudio diff --git a/src/mod/mod_event_test/mod_event_test.c b/src/mod/mod_event_test/mod_event_test.c index fd979e1e0f..5f1f82e492 100644 --- a/src/mod/mod_event_test/mod_event_test.c +++ b/src/mod/mod_event_test/mod_event_test.c @@ -47,7 +47,7 @@ static switch_loadable_module_interface event_test_module_interface = { /*.application_interface*/ NULL }; -switch_status switch_module_load(switch_loadable_module_interface **interface, char *filename) { +SWITCH_MOD_DECLARE(switch_status) switch_module_load(switch_loadable_module_interface **interface, char *filename) { /* connect my internal structure to the blank pointer passed to me */ *interface = &event_test_module_interface; diff --git a/src/mod/mod_exosip/Makefile b/src/mod/mod_exosip/Makefile index 91efe15520..76dc9d18ec 100644 --- a/src/mod/mod_exosip/Makefile +++ b/src/mod/mod_exosip/Makefile @@ -1,7 +1,6 @@ #CFLAGS += -I/usr/src/common/src LDFLAGS += -leXosip2 -ljrtp4c -OSARCH=$(shell uname -s) ifeq ($(OSARCH),Darwin) LINKER=g++ else diff --git a/src/mod/mod_iaxchan/mod_iaxchan.c b/src/mod/mod_iaxchan/mod_iaxchan.c index 2916727816..7b93cf8ad7 100644 --- a/src/mod/mod_iaxchan/mod_iaxchan.c +++ b/src/mod/mod_iaxchan/mod_iaxchan.c @@ -629,9 +629,11 @@ static switch_status channel_write_frame(switch_core_session *session, switch_fr return SWITCH_STATUS_FALSE; } +#ifndef BIGENDIAN if (switch_test_flag(tech_pvt, TFLAG_LINEAR)) { switch_swap_linear(frame->data, (int)frame->datalen / 2); } +#endif iax_send_voice(tech_pvt->iax_session, tech_pvt->codec, frame->data, (int)frame->datalen, tech_pvt->write_codec.implementation->samples_per_frame); return SWITCH_STATUS_SUCCESS; diff --git a/src/mod/mod_playback/mod_playback.c b/src/mod/mod_playback/mod_playback.c index 5d0efbb223..287c36f1e8 100644 --- a/src/mod/mod_playback/mod_playback.c +++ b/src/mod/mod_playback/mod_playback.c @@ -127,6 +127,9 @@ void playback_function(switch_core_session *session, char *data) } write_frame.datalen = ilen; +#ifdef BIGENDIAN + switch_swap_linear(write_frame.data, (int)write_frame.datalen / 2); +#endif if (switch_core_session_write_frame(session, &write_frame, -1) != SWITCH_STATUS_SUCCESS) { switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bad Write\n"); break;