提交 4da77ea5 authored 作者: Anthony Minessale's avatar Anthony Minessale

hi

git-svn-id: http://svn.freeswitch.org/svn/local/src/freeswitch@11 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 138e8039
差异被折叠。
SQLITE (> make sqlite)
It will download and build and install sqlite
APR (> make apr)
it will and download and build and install apr if needed but remember to make sure
/usr/local/apr/lib is in the LD_LIBRARY_PATH that's up to you
cp modules.conf.in modules.conf and edit to taste
if you want sip:
make sure mod_exosip is uncommeted in modules.conf
make common
make exosip
make; make install
EXTRA_DIST =
SUBDIRS =
AUTOMAKE_OPTS = gnu
MAKE=gmake
NAME=freeswitch
PREFIX=$(prefix)/${NAME}
APR_CONFIG=$(prefix)/bin/apr-1-config
AM_CFLAGS = $(shell $(APR_CONFIG) --cflags --cppflags --includes)
AM_LDFLAGS = $(shell $(APR_CONFIG) --link-ld --libs ) -Wl,-E -L$(PREFIX)/lib
AM_CFLAGS += -fPIC -Wall
AM_CFLAGS +=-I$(PWD) -I$(PWD)/include -I$(PREFIX)/include
AM_CFLAGS += -DSWITCH_MOD_DIR=\"$(PREFIX)/mod\"
AM_CFLAGS += -DSWITCH_PREFIX_DIR=\"$(PREFIX)\"
AM_CFLAGS += -DSWITCH_CONF_DIR=\"$(PREFIX)/conf\"
libfreeswitch_la_SOURCES = \
src/include/switch.h \
src/include/switch_channel.h \
src/include/switch_config.h \
src/include/switch_console.h \
src/include/switch_core.h \
src/include/switch_frame.h \
src/include/switch_loadable_module.h \
src/include/switch_module_interfaces.h \
src/include/switch_mutex.h \
src/include/switch_types.h \
src/include/switch_utils.h \
src/include/switch_caller.h \
src/include/switch_buffer.h \
src/switch_buffer.c \
src/switch_caller.c \
src/switch_channel.c \
src/switch_config.c \
src/switch_console.c \
src/switch_core.c \
src/switch_loadable_module.c \
src/switch_mutex.c \
src/switch_utils.c
#bindir = $(PREFIX)/bin
#libdir = $(PREFIX)/lib
library_includedir = $(PREFIX)/include
library_include_HEADERS = src/include/switch.h \
src/include/switch_channel.h \
src/include/switch_config.h \
src/include/switch_console.h \
src/include/switch_core.h \
src/include/switch_frame.h \
src/include/switch_loadable_module.h \
src/include/switch_module_interfaces.h \
src/include/switch_mutex.h \
src/include/switch_types.h \
src/include/switch_utils.h \
src/include/switch_caller.h \
src/include/switch_buffer.h
lib_LTLIBRARIES = libfreeswitch.la
libfreeswitch_la_CFLAGS = $(AM_CFLAGS) -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g
libfreeswitch_la_LDFLAGS = -version-info 1:0:0
bin_PROGRAMS = freeswitch
freeswitch_SOURCES = src/switch.c
freeswitch_CFLAGS = $(AM_CFLAGS)
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 ; 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 ; CFLAGS="$(CFLAGS)" CC="$(CC)" MOD="$$i" make -f $(PWD)/generic_mod.mk -C $$i clean || exit 1; done
install_mod:
@echo Installing $(NAME)
@mkdir -p $(PREFIX) $(PREFIX)/conf $(PREFIX)/mod $(PREFIX)/db
@/bin/cp -p ./$(NAME) $(PREFIX)/bin
@ln -sf $(PREFIX)/bin/$(NAME) /usr/bin
@echo Installing Modules
@/bin/cp -f src/mod/*/mod_*.so $(PREFIX)/mod >/dev/null 2<&1 || echo No modules to copy.
@echo done
eclean: clean
rm -f `find . -type f -name \*~`
rm -f `find . -type f -name \.*~`
rm -f `find . -type f -name \#\*`
rm -f `find . -type f -name \.\#\*`
rm -f `find . -type f -name core\*`
rm -f *.tar *.tgz *.gz
megaclean: eclean modclean
rm -fr $(SQLITETAR) $(SQLITE) $(APR) $(APRTAR) $(SOX) $(SOXTAR) $(COMMONTAR)
差异被折叠。
1. MOD_PLAYBACK: Convert to use APR files, remove all the WIN32 ifdefs for file stuff.
2. switch.h: Find a good home for the SWITCH_DECLARE stuff for win32
3. MOD_WOOMERACHAN: #if 1==0 sectiton, convert to use switch_now instead of gettimeof day
SWITCH_SLEEP (should I be using switch_sleep or switch_yield where I changed from sleep and usleep)
4. all // comented headers and code, cleanup\remove after verifying everything works happy on other platforms
5. if we don't need the timeval stuff let's get rid of it... it doesn't appear to be used.
6. Decide if we are going to keep the libraries in tree or if we build a system that downloads (and patches if necessary)
7. Exclude .ilk files from loading as modules (they are built when building debug builds and greatly increase the speed of re-linking the lib on a recompile)...
it is necessary if we want to be able to debug from the gui. It can be #ifdef WIN32'd if you like.
\ No newline at end of file
差异被折叠。
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
# Copyright 1999, 2000 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 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.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Usage:
# compile PROGRAM [ARGS]...
# `-o FOO.o' is removed from the args passed to the actual compile.
prog=$1
shift
ofile=
cfile=
args=
while test $# -gt 0; do
case "$1" in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we do something ugly here.
ofile=$2
shift
case "$ofile" in
*.o | *.obj)
;;
*)
args="$args -o $ofile"
ofile=
;;
esac
;;
*.c)
cfile=$1
args="$args $1"
;;
*)
args="$args $1"
;;
esac
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$prog" $args
fi
# Name of file we expect compiler to create.
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir $lockdir > /dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir $lockdir; exit 1" 1 2 15
# Run the compile.
"$prog" $args
status=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
fi
rmdir $lockdir
exit $status
[extensions]
1000 => playback /tmp/siriusraw.raw
888 => bridge woomera/888@10.200.68.194
[settings]
span=1
dchan=24
node=cpe
switch=ni2
debug=1
dialplan=demo
bpf=160
[settings]
debug=2
[profile]
host=localhost
port=42420
audio_ip=10.200.10.20
dialplan=demo
差异被折叠。
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `gethostname' function. */
#undef HAVE_GETHOSTNAME
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the `strftime' function. */
#undef HAVE_STRFTIME
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strncasecmp' function. */
#undef HAVE_STRNCASECMP
/* Define to 1 if you have the `strstr' function. */
#undef HAVE_STRSTR
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_NDIR_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* Version number of package */
#undef VERSION
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
差异被折叠。
差异被折叠。
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AM_INIT_AUTOMAKE(libfreeswitch,0.1)
AC_CONFIG_SRCDIR([src/switch.c])
AC_CONFIG_HEADER([src/include/config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AC_PROG_INSTALL
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([gethostname gettimeofday localtime_r memmove memset socket strcasecmp strchr strdup strncasecmp strstr])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AC_CONFIG_SRCDIR([switch.c])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
# Checks for libraries.
# FIXME: Replace `main' with a function in `-leXosip2':
AC_CHECK_LIB([eXosip2], [main])
# FIXME: Replace `main' with a function in `-lsangoma':
AC_CHECK_LIB([sangoma], [main])
# FIXME: Replace `main' with a function in `-lspeex':
AC_CHECK_LIB([speex], [main])
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([gethostname gettimeofday localtime_r memmove memset socket strcasecmp strchr strdup strncasecmp strstr])
AC_CONFIG_FILES([Makefile
mod/mod_exosip/Makefile
mod/mod_g711codec/Makefile
mod/mod_speexcodec/Makefile
mod/mod_wanchan/Makefile])
AC_OUTPUT
差异被折叠。
$(MOD).so: $(MOD).c
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o
$(CC) -shared -Xlinker -x $(MOD).o -o $(MOD).so $(LDFLAGS)
all: $(MOD).so
clean:
rm -fr *.so *.o *~
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
# list the modules to build
mod_bridgecall
mod_dialplan_demo
mod_softtimer
mod_woomerachan
mod_playback
#mod_wanchan
mod_speexcodec
mod_exosip
mod_g711codec
mod_rawaudio
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论