The Eurostar Commit! (it's amazing how much work you can get done on a 150 minute train ride from Paris to London <G>)
support the new location for zaptel.h and tonezone.h use the dependency information output by menuselect to build Makefile rules for each module for header files and libraries combine the common rules into a top-level Makefile.rules file remove all (now) unnecessary stuff from subdir Makefiles change translator API so that the newpvt() callback returns an int instead of a pointer (it no longer allocates memory) alphabetize --with-<foo> options in configure script enhance Net-SNMP support in configure script to provide a --with-netsnmp option fix support for --with-pq so that if pg-config is not found when --with-pq is specified, an error will be generated add 'optional package' usage to modules now that menuselect can output it allow res_snmp to build by default, since the new loader changes coming soon will solve the function naming problem (and users can disable it via menuselect anyway) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35832 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
3df43d0174
commit
41af2260b7
15
Makefile
15
Makefile
|
@ -228,9 +228,6 @@ ifeq ($(OSARCH),FreeBSD)
|
|||
BSDVERSION=$(shell make -V OSVERSION -f $(CROSS_COMPILE_TARGET)/usr/share/mk/bsd.port.subdir.mk)
|
||||
ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
|
||||
LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
|
||||
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/spandsp),)
|
||||
ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/spandsp
|
||||
endif
|
||||
endif # FreeBSD
|
||||
|
||||
ifeq ($(OSARCH),NetBSD)
|
||||
|
@ -303,9 +300,9 @@ ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),)
|
|||
endif
|
||||
|
||||
ifeq ($(OSARCH),Linux)
|
||||
LIBS+=-ldl -lpthread $(EDITLINE_LIBS) -lm -lresolv #-lnjamd
|
||||
LIBS+=-ldl -lpthread $(EDITLINE_LIB) -lm -lresolv #-lnjamd
|
||||
else
|
||||
LIBS+=$(EDITLINE_LIBS) -lm
|
||||
LIBS+=$(EDITLINE_LIB) -lm
|
||||
endif
|
||||
|
||||
ifeq ($(OSARCH),Darwin)
|
||||
|
@ -333,11 +330,11 @@ ifeq ($(OSARCH),FreeBSD)
|
|||
endif
|
||||
|
||||
ifeq ($(OSARCH),NetBSD)
|
||||
LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIBS)
|
||||
LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIB)
|
||||
endif
|
||||
|
||||
ifeq ($(OSARCH),OpenBSD)
|
||||
LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIBS)
|
||||
LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB)
|
||||
endif
|
||||
|
||||
ifeq ($(OSARCH),SunOS)
|
||||
|
@ -474,6 +471,9 @@ include/asterisk/buildopts.h: menuselect.makeopts
|
|||
fi
|
||||
@rm -f $@.tmp
|
||||
|
||||
channel.o: channel.c
|
||||
$(CC) -c -o $@ $< $(CFLAGS) $(ZAPTEL_INCLUDE)
|
||||
|
||||
asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.a $(OBJS)
|
||||
build_tools/make_build_h > include/asterisk/build.h.tmp
|
||||
if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \
|
||||
|
@ -885,5 +885,6 @@ mxml/libmxml.a:
|
|||
makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(dir)/*.c) build_tools/cflags.xml sounds/sounds.xml
|
||||
@echo "Generating list of available modules ..."
|
||||
@build_tools/prep_moduledeps > $@
|
||||
@sed -i -e /MENUSELECT_DEPENDS/d menuselect.makeopts
|
||||
|
||||
.PHONY: menuselect sounds clean clean-depend dist-clean distclean all _all depend cleantest uninstall _uninstall uninstall-all dont-optimize valgrind $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_CLEAN_DEPEND) $(SUBDIRS_DEPEND) $(SUBDIRS_UNINSTALL) $(SUBDIRS)
|
||||
|
|
|
@ -5,62 +5,23 @@
|
|||
#
|
||||
# Copyright (C) 1999-2006, Digium, Inc.
|
||||
#
|
||||
# Mark Spencer <markster@digium.com>
|
||||
#
|
||||
# This program is free software, distributed under the terms of
|
||||
# the GNU General Public License
|
||||
#
|
||||
|
||||
.PHONY: clean clean-depend all depend uninstall
|
||||
|
||||
ifneq ($(wildcard ../menuselect.makeopts),)
|
||||
include ../menuselect.makeopts
|
||||
endif
|
||||
|
||||
SELECTED_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
|
||||
|
||||
MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
|
||||
MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE) $(MENUSELECT_DEPENDS_EXTENDED_ODBC_STORAGE)
|
||||
|
||||
app_voicemail.o: CFLAGS+=$(patsubst %,-D%,$(MENUSELECT_app_voicemail))
|
||||
all: _all
|
||||
|
||||
all: $(MODS)
|
||||
|
||||
clean-depend:
|
||||
rm -f .depend
|
||||
|
||||
clean: clean-depend
|
||||
rm -f *.so *.o
|
||||
|
||||
%.so: %.o
|
||||
$(CC) $(SOLINK) -o $@ $<
|
||||
|
||||
app_rpt.so: app_rpt.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(TONEZONE_LIB)
|
||||
|
||||
app_rpt.o: app_rpt.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(TONEZONE_INCLUDE) $(ZAPTEL_INCLUDE) $<
|
||||
|
||||
app_flash.o app_meetme.o app_page.o app_zapbarge.o app_zapras.o app_zapscan.o: %.o: %.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(ZAPTEL_INCLUDE) $<
|
||||
|
||||
install: all
|
||||
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
||||
|
||||
uninstall:
|
||||
include ../Makefile.rules
|
||||
|
||||
ifeq (SunOS,$(shell uname))
|
||||
app_chanspy.so: app_chanspy.o
|
||||
$(CC) $(SOLINK) -o $@ $< -lrt
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard .depend),)
|
||||
include .depend
|
||||
endif
|
||||
|
||||
depend: .depend
|
||||
|
||||
.depend:
|
||||
../build_tools/mkdep $(CFLAGS) `ls *.c`
|
||||
|
||||
env:
|
||||
env
|
||||
|
|
|
@ -38,11 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
#ifdef __linux__
|
||||
#include <linux/zaptel.h>
|
||||
#else
|
||||
#include <zaptel.h>
|
||||
#endif /* __linux__ */
|
||||
|
||||
#include "asterisk/lock.h"
|
||||
#include "asterisk/file.h"
|
||||
|
|
|
@ -39,11 +39,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
#ifdef __linux__
|
||||
#include <linux/zaptel.h>
|
||||
#else
|
||||
#include <zaptel.h>
|
||||
#endif /* __linux__ */
|
||||
|
||||
#include "asterisk/lock.h"
|
||||
#include "asterisk/file.h"
|
||||
|
|
|
@ -222,8 +222,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
#include <sys/ioctl.h>
|
||||
#include <sys/io.h>
|
||||
#include <math.h>
|
||||
#include <zaptel.h>
|
||||
#include <tonezone.h>
|
||||
#include <linux/zaptel.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
|
|
|
@ -45,12 +45,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#ifdef __linux__
|
||||
#include <linux/zaptel.h>
|
||||
#else
|
||||
#include <zaptel.h>
|
||||
#endif /* __linux__ */
|
||||
|
||||
#include "asterisk/lock.h"
|
||||
#include "asterisk/file.h"
|
||||
|
|
|
@ -48,13 +48,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
/* Need some zaptel help here */
|
||||
#ifdef __linux__
|
||||
#include <linux/zaptel.h>
|
||||
#else
|
||||
#include <zaptel.h>
|
||||
#endif /* __linux__ */
|
||||
|
||||
#include "asterisk/lock.h"
|
||||
#include "asterisk/file.h"
|
||||
|
|
|
@ -44,12 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#ifdef __linux__
|
||||
#include <linux/zaptel.h>
|
||||
#else
|
||||
#include <zaptel.h>
|
||||
#endif /* __linux__ */
|
||||
|
||||
#include "asterisk/lock.h"
|
||||
#include "asterisk/file.h"
|
||||
|
|
|
@ -11,7 +11,7 @@ LIBPRI=@PBX_LIBLIBPRI@
|
|||
LIBSPEEX=@PBX_LIBSPEEX@
|
||||
LIBVORBIS=@PBX_LIBVORBIS@
|
||||
NBS=@PBX_LIBNBS@
|
||||
OGG=@PBX_LIBOGG@
|
||||
LIBOGG=@PBX_LIBOGG@
|
||||
OSSAUDIO=@PBX_LIBOSS@
|
||||
PGSQL=@PBX_LIBpq@
|
||||
QT=@PBX_QT@
|
||||
|
|
74
cdr/Makefile
74
cdr/Makefile
|
@ -5,31 +5,17 @@
|
|||
#
|
||||
# Copyright (C) 1999-2006, Digium, Inc.
|
||||
#
|
||||
# Mark Spencer <markster@digium.com>
|
||||
#
|
||||
# This program is free software, distributed under the terms of
|
||||
# the GNU General Public License
|
||||
#
|
||||
|
||||
.PHONY: clean clean-depend all depend uninstall
|
||||
|
||||
ifneq ($(wildcard ../menuselect.makeopts),)
|
||||
include ../menuselect.makeopts
|
||||
endif
|
||||
|
||||
SELECTED_MODS:=$(filter-out $(MENUSELECT_CDR),$(patsubst %.c,%,$(wildcard cdr_*.c)))
|
||||
|
||||
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
|
||||
#This works for even old (2.96) versions of gcc and provides a small boost either way.
|
||||
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
|
||||
#So we go lowest common available by gcc and go a step down, still a step up from
|
||||
#the default as we now have a better instruction set to work with. - Belgarath
|
||||
ifeq ($(PROC),sparc64)
|
||||
PROC=ultrasparc
|
||||
CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
|
||||
endif
|
||||
|
||||
ifneq ($(TDS_LIB),)
|
||||
ifneq ($(FREETDS_LIB),)
|
||||
ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.63),1)
|
||||
CFLAGS += -DFREETDS_0_63
|
||||
else
|
||||
|
@ -41,60 +27,6 @@ ifneq ($(TDS_LIB),)
|
|||
endif
|
||||
endif
|
||||
|
||||
MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
|
||||
all: _all
|
||||
|
||||
all: $(MODS)
|
||||
|
||||
install: all
|
||||
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
||||
|
||||
uninstall:
|
||||
|
||||
clean-depend:
|
||||
rm -f .depend
|
||||
|
||||
clean: clean-depend
|
||||
rm -f *.so *.o
|
||||
|
||||
%.so : %.o
|
||||
$(CC) $(SOLINK) -o $@ $<
|
||||
|
||||
cdr_odbc.so: cdr_odbc.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(ODBC_LIB)
|
||||
|
||||
cdr_odbc.o: cdr_odbc.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(ODBC_INCLUDE) $<
|
||||
|
||||
cdr_tds.so: cdr_tds.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(TDS_LIB)
|
||||
|
||||
cdr_tds.o: cdr_tds.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(TDS_INCLUDE) $<
|
||||
|
||||
cdr_pgsql.so: cdr_pgsql.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(PGSQL_LIB)
|
||||
|
||||
cdr_pgsql.o: cdr_pgsql.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(PGSQL_INCLUDE) $<
|
||||
|
||||
cdr_sqlite.so: cdr_sqlite.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(SQLITE_LIB)
|
||||
|
||||
cdr_sqlite.o: cdr_sqlite.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(SQLITE_INCLUDE) $<
|
||||
|
||||
cdr_radius.so: cdr_radius.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(RADIUSCLIENT_LIB)
|
||||
|
||||
cdr_radius.o: cdr_radius.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(RADIUSCLIENT_INCLUDE) $<
|
||||
|
||||
|
||||
ifneq ($(wildcard .depend),)
|
||||
include .depend
|
||||
endif
|
||||
|
||||
depend: .depend
|
||||
|
||||
.depend:
|
||||
../build_tools/mkdep $(CFLAGS) `ls *.c`
|
||||
include ../Makefile.rules
|
||||
|
|
|
@ -38,14 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
|
||||
#ifdef HAVE_ZAPTEL
|
||||
#include <sys/ioctl.h>
|
||||
#ifdef __linux__
|
||||
#include <linux/zaptel.h>
|
||||
#else
|
||||
#include <zaptel.h>
|
||||
#endif /* __linux__ */
|
||||
#ifndef ZT_TIMERPING
|
||||
#error "You need newer zaptel! Please cvs update zaptel"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "asterisk/pbx.h"
|
||||
|
|
|
@ -5,14 +5,10 @@
|
|||
#
|
||||
# Copyright (C) 1999-2006, Digium, Inc.
|
||||
#
|
||||
# Mark Spencer <markster@digium.com>
|
||||
#
|
||||
# This program is free software, distributed under the terms of
|
||||
# the GNU General Public License
|
||||
#
|
||||
|
||||
.PHONY: clean clean-depend all depend uninstall
|
||||
|
||||
ifneq ($(wildcard ../menuselect.makeopts),)
|
||||
include ../menuselect.makeopts
|
||||
endif
|
||||
|
@ -30,11 +26,6 @@ ifeq ($(OSARCH),Linux)
|
|||
CHANH323LIB=-ldl
|
||||
endif
|
||||
|
||||
ifeq ($(PROC),sparc64)
|
||||
PROC=ultrasparc
|
||||
CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
|
||||
endif
|
||||
|
||||
ifeq ($(OSARCH),FreeBSD)
|
||||
PTLIB=-lpt_FreeBSD_x86_r
|
||||
H323LIB=-lh323_FreeBSD_x86_r
|
||||
|
@ -46,10 +37,6 @@ ifeq ($(OSARCH),NetBSD)
|
|||
H323LIB=-lh323_NetBSD_x86_r
|
||||
endif
|
||||
|
||||
ifeq ($(OSARCH),SunOS)
|
||||
SOLINK+=-lrt
|
||||
endif
|
||||
|
||||
ifeq ($(wildcard h323/libchanh323.a),)
|
||||
SELECTED_MODS:=$(filter-out chan_h323,$(SELECTED_MODS))
|
||||
endif
|
||||
|
@ -68,24 +55,15 @@ ifndef PWLIBDIR
|
|||
PWLIBDIR=$(HOME)/pwlib
|
||||
endif
|
||||
|
||||
MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
|
||||
MENUSELECT_OPTS_chan_misdn+=CHAN_MISDN_VERSION=\"0.3.0\"
|
||||
|
||||
all: $(MODS)
|
||||
all: _all
|
||||
|
||||
clean-depend:
|
||||
rm -f .depend
|
||||
include ../Makefile.rules
|
||||
|
||||
clean: clean-depend
|
||||
rm -f *.so *.o
|
||||
clean::
|
||||
rm -f busy.h ringtone.h gentone gentone-ulaw
|
||||
|
||||
%.so : %.o
|
||||
$(CC) $(SOLINK) -o $@ $<
|
||||
|
||||
ifneq ($(wildcard .depend),)
|
||||
include .depend
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard h323/Makefile.ast),)
|
||||
include h323/Makefile.ast
|
||||
endif
|
||||
|
@ -94,11 +72,8 @@ ifneq ($(wildcard misdn/Makefile.ast),)
|
|||
include misdn/Makefile.ast
|
||||
endif
|
||||
|
||||
gentone: gentone.c
|
||||
$(HOST_CC) -o gentone gentone.c -lm
|
||||
|
||||
gentone-ulaw: gentone-ulaw.c
|
||||
$(HOST_CC) -o gentone-ulaw gentone-ulaw.c -lm
|
||||
gentone gentone-ulaw: %: %.c
|
||||
$(HOST_CC) -o $@ $< -lm
|
||||
|
||||
busy.h: gentone
|
||||
./gentone busy 480 620
|
||||
|
@ -107,31 +82,10 @@ ringtone.h: gentone
|
|||
./gentone ringtone 440 480
|
||||
|
||||
chan_oss.o: chan_oss.c busy.h ringtone.h
|
||||
$(CC) -c -o $@ $(CFLAGS) $(OSSAUDIO_INCLUDE) $<
|
||||
|
||||
chan_oss.so: chan_oss.o
|
||||
$(CC) $(SOLINK) -o $@ chan_oss.o $(OSSAUDIO_LIB)
|
||||
chan_iax2.so: iax2-parser.o iax2-provision.o
|
||||
|
||||
chan_iax2.so: chan_iax2.o iax2-parser.o iax2-provision.o
|
||||
$(CC) $(SOLINK) -o $@ $^
|
||||
|
||||
chan_zap.so: chan_zap.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(PRI_LIB) $(TONEZONE_LIB)
|
||||
|
||||
chan_zap.o: chan_zap.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(TONEZONE_INCLUDE) $(ZAPTEL_INCLUDE) $<
|
||||
|
||||
chan_alsa.so: chan_alsa.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(ASOUND_LIB)
|
||||
|
||||
chan_alsa.o: chan_alsa.c busy.h ringtone.h
|
||||
$(CC) -c -o $@ $(CFLAGS) $(ASOUND_INCLUDE) $<
|
||||
|
||||
chan_nbs.so: chan_nbs.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(NBS_LIB)
|
||||
|
||||
chan_nbs.o: chan_nbs.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(NBS_INCLUDE) $<
|
||||
chan_alsa.o: busy.h ringtone.h
|
||||
|
||||
chan_vpb.o: chan_vpb.c
|
||||
$(CXX) -c $(CFLAGS:-Werror=) -o $@ chan_vpb.c
|
||||
|
@ -139,12 +93,6 @@ chan_vpb.o: chan_vpb.c
|
|||
chan_vpb.so: chan_vpb.o
|
||||
$(CXX) $(SOLINK) -o $@ $< -lvpb -lpthread -lm -ldl
|
||||
|
||||
chan_jingle.o: chan_jingle.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(IKSEMEL_INCLUDE) $<
|
||||
|
||||
chan_jingle.so: chan_jingle.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(IKSEMEL_LIB)
|
||||
|
||||
ifeq ($(OSARCH),Linux)
|
||||
chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast
|
||||
$(CC) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) -lstdc++
|
||||
|
@ -156,24 +104,5 @@ endif
|
|||
misdn/chan_misdn_lib.a:
|
||||
make -C misdn
|
||||
|
||||
chan_misdn.so: chan_misdn.o misdn_config.o misdn/chan_misdn_lib.a
|
||||
$(CC) -shared -Xlinker -x -L/usr/lib -o $@ $^ -lisdnnet -lmISDN
|
||||
|
||||
chan_misdn.o: chan_misdn.c
|
||||
$(CC) $(CFLAGS) -DCHAN_MISDN_VERSION=\"0.3.0\" -c $< -o $@
|
||||
|
||||
misdn_config.o: misdn_config.c misdn/chan_misdn_config.h
|
||||
$(CC) $(CFLAGS) -DCHAN_MISDN_VERSION=\"0.3.0\" -c $< -o $@
|
||||
|
||||
install: all
|
||||
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
||||
|
||||
uninstall:
|
||||
|
||||
depend: .depend
|
||||
|
||||
.depend:
|
||||
../build_tools/mkdep $(CFLAGS) `ls *.c`
|
||||
|
||||
env:
|
||||
env
|
||||
chan_misdn.so: misdn_config.o misdn/chan_misdn_lib.a
|
||||
$(CC) $(SOLINK) -o $@ $^ -lisdnnet -lmISDN
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
* \ingroup channel_drivers
|
||||
*/
|
||||
|
||||
/*** MODULEINFO
|
||||
<use>zaptel</use>
|
||||
***/
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
|
@ -56,11 +60,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
|
||||
#ifdef HAVE_ZAPTEL
|
||||
#include <sys/ioctl.h>
|
||||
#ifdef __linux__
|
||||
#include <linux/zaptel.h>
|
||||
#else
|
||||
#include <zaptel.h>
|
||||
#endif /* __linux__ */
|
||||
#endif
|
||||
|
||||
#include "asterisk/lock.h"
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
/*** MODULEINFO
|
||||
<depend>zaptel</depend>
|
||||
<depend>tonezone</depend>
|
||||
<use>libpri</use>
|
||||
***/
|
||||
|
||||
#include "asterisk.h"
|
||||
|
@ -61,20 +62,13 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
#endif
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#ifdef __linux__
|
||||
#include <linux/zaptel.h>
|
||||
#else
|
||||
#include <zaptel.h>
|
||||
#endif /* __linux__ */
|
||||
#include <math.h>
|
||||
#include <tonezone.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_LIBPRI
|
||||
#include <libpri.h>
|
||||
#ifndef PRI_KEYPAD_FACILITY_TX
|
||||
#error "You need newer libpri"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "asterisk/lock.h"
|
||||
|
|
|
@ -700,12 +700,13 @@ struct g726_coder_pvt {
|
|||
};
|
||||
|
||||
/*! \brief init a new instance of g726_coder_pvt. */
|
||||
static void *lintog726_new(struct ast_trans_pvt *pvt)
|
||||
static int lintog726_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct g726_coder_pvt *tmp = pvt->pvt;
|
||||
|
||||
g726_init_state(&tmp->g726);
|
||||
return tmp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief decode packed 4-bit G726 values and store in buffer. */
|
||||
|
|
|
@ -68,13 +68,11 @@ struct gsm_translator_pvt { /* both gsm2lin and lin2gsm */
|
|||
int16_t buf[BUFFER_SAMPLES]; /* lin2gsm, temporary storage */
|
||||
};
|
||||
|
||||
static void *gsm_new(struct ast_trans_pvt *pvt)
|
||||
static int gsm_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct gsm_translator_pvt *tmp = pvt->pvt;
|
||||
|
||||
if (!(tmp->gsm = gsm_create()))
|
||||
return NULL;
|
||||
return tmp;
|
||||
return (tmp->gsm = gsm_create()) ? 0 : -1;
|
||||
}
|
||||
|
||||
static struct ast_frame *lintogsm_sample(void)
|
||||
|
|
|
@ -67,20 +67,22 @@ struct ilbc_coder_pvt {
|
|||
int16_t buf[BUFFER_SAMPLES];
|
||||
};
|
||||
|
||||
static void *lintoilbc_new(struct ast_trans_pvt *pvt)
|
||||
static int lintoilbc_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct ilbc_coder_pvt *tmp = pvt->pvt;
|
||||
|
||||
initEncode(&tmp->enc, ILBC_MS);
|
||||
return tmp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void *ilbctolin_new(struct ast_trans_pvt *pvt)
|
||||
static int ilbctolin_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct ilbc_coder_pvt *tmp = pvt->pvt;
|
||||
|
||||
initDecode(&tmp->dec, ILBC_MS, USE_ILBC_ENHANCER);
|
||||
return tmp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ast_frame *lintoilbc_sample(void)
|
||||
|
|
|
@ -72,22 +72,18 @@ struct lpc10_coder_pvt {
|
|||
int longer;
|
||||
};
|
||||
|
||||
static void *lpc10_enc_new(struct ast_trans_pvt *pvt)
|
||||
static int lpc10_enc_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct lpc10_coder_pvt *tmp = pvt->pvt;
|
||||
|
||||
if (!(tmp->lpc10.enc = create_lpc10_encoder_state()))
|
||||
return NULL;
|
||||
return tmp;
|
||||
return (tmp->lpc10.enc = create_lpc10_encoder_state()) ? 0 : -1;
|
||||
}
|
||||
|
||||
static void *lpc10_dec_new(struct ast_trans_pvt *pvt)
|
||||
static int lpc10_dec_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct lpc10_coder_pvt *tmp = pvt->pvt;
|
||||
|
||||
if (!(tmp->lpc10.dec = create_lpc10_decoder_state()))
|
||||
return NULL;
|
||||
return tmp;
|
||||
return (tmp->lpc10.dec = create_lpc10_decoder_state()) ? 0 : -1;
|
||||
}
|
||||
|
||||
static struct ast_frame *lintolpc10_sample(void)
|
||||
|
|
|
@ -103,17 +103,16 @@ struct speex_coder_pvt {
|
|||
};
|
||||
|
||||
|
||||
static void *lintospeex_new(struct ast_trans_pvt *pvt)
|
||||
static int lintospeex_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct speex_coder_pvt *tmp = pvt->pvt;
|
||||
|
||||
if (!(tmp->speex = speex_encoder_init(&speex_nb_mode)))
|
||||
return NULL;
|
||||
return -1;
|
||||
|
||||
speex_bits_init(&tmp->bits);
|
||||
speex_bits_reset(&tmp->bits);
|
||||
speex_encoder_ctl(tmp->speex, SPEEX_GET_FRAME_SIZE, &tmp->framesize);
|
||||
ast_log(LOG_WARNING, "speex framesize is %d\n", tmp->framesize);
|
||||
speex_encoder_ctl(tmp->speex, SPEEX_SET_COMPLEXITY, &complexity);
|
||||
#ifdef _SPEEX_TYPES_H
|
||||
if (preproc) {
|
||||
|
@ -142,20 +141,22 @@ static void *lintospeex_new(struct ast_trans_pvt *pvt)
|
|||
speex_encoder_ctl(tmp->speex, SPEEX_SET_DTX, &dtx);
|
||||
tmp->silent_state = 0;
|
||||
|
||||
return tmp;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void *speextolin_new(struct ast_trans_pvt *pvt)
|
||||
static int speextolin_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct speex_coder_pvt *tmp = pvt->pvt;
|
||||
|
||||
if (!(tmp->speex = speex_decoder_init(&speex_nb_mode)))
|
||||
return NULL;
|
||||
return -1;
|
||||
|
||||
speex_bits_init(&tmp->bits);
|
||||
speex_decoder_ctl(tmp->speex, SPEEX_GET_FRAME_SIZE, &tmp->framesize);
|
||||
if (enhancement)
|
||||
speex_decoder_ctl(tmp->speex, SPEEX_SET_ENH, &enhancement);
|
||||
return tmp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ast_frame *lintospeex_sample(void)
|
||||
|
|
|
@ -43,7 +43,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
#include <linux/zaptel.h>
|
||||
#include <zaptel.h>
|
||||
|
||||
#include "asterisk/lock.h"
|
||||
#include "asterisk/translate.h"
|
||||
|
@ -162,7 +162,7 @@ static void zap_destroy(struct ast_trans_pvt *pvt)
|
|||
close(ztp->fd);
|
||||
}
|
||||
|
||||
static struct ast_trans_pvt *zap_translate(struct ast_trans_pvt *pvt, int dest, int source)
|
||||
static int zap_translate(struct ast_trans_pvt *pvt, int dest, int source)
|
||||
{
|
||||
/* Request translation through zap if possible */
|
||||
int fd;
|
||||
|
@ -171,13 +171,13 @@ static struct ast_trans_pvt *zap_translate(struct ast_trans_pvt *pvt, int dest,
|
|||
struct zt_transcode_header *hdr;
|
||||
|
||||
if ((fd = open("/dev/zap/transcode", O_RDWR)) < 0)
|
||||
return NULL;
|
||||
return -1;
|
||||
|
||||
if ((hdr = mmap(NULL, sizeof(*hdr), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) {
|
||||
ast_log(LOG_ERROR, "Memory Map failed for transcoding (%s)\n", strerror(errno));
|
||||
close(fd);
|
||||
|
||||
return NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (hdr->magic != ZT_TRANSCODE_MAGIC) {
|
||||
|
@ -185,7 +185,7 @@ static struct ast_trans_pvt *zap_translate(struct ast_trans_pvt *pvt, int dest,
|
|||
munmap(hdr, sizeof(*hdr));
|
||||
close(fd);
|
||||
|
||||
return NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
hdr->srcfmt = (1 << source);
|
||||
|
@ -195,17 +195,17 @@ static struct ast_trans_pvt *zap_translate(struct ast_trans_pvt *pvt, int dest,
|
|||
munmap(hdr, sizeof(*hdr));
|
||||
close(fd);
|
||||
|
||||
return NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
ztp = pvt->pvt;
|
||||
ztp->fd = fd;
|
||||
ztp->hdr = hdr;
|
||||
|
||||
return pvt;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void *zap_new(struct ast_trans_pvt *pvt)
|
||||
static int zap_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
return zap_translate(pvt, pvt->t->dstfmt, pvt->t->srcfmt);
|
||||
}
|
||||
|
|
628
configure.ac
628
configure.ac
|
@ -193,126 +193,11 @@ AC_ARG_ENABLE(dev-mode,
|
|||
esac])
|
||||
AC_SUBST(AST_DEVMODE)
|
||||
|
||||
# from here on down, library checking should be done in alphabetical order
|
||||
# by the --with option name, to make things easier for the users :-)
|
||||
|
||||
AST_EXT_LIB([asound], [snd_spcm_init], [alsa/asoundlib.h], [ALSA], [Advanced Linux Sound Architecture], [-lm -ldl])
|
||||
AST_EXT_LIB([curses], [initscr], [curses.h], [CURSES], [curses], [])
|
||||
AST_EXT_LIB([iksemel], [iks_start_sasl], [iksemel.h], [IKSEMEL], [Iksemel Jabber Library])
|
||||
AST_EXT_LIB([nbs], [nbs_connect], [nbs.h], [NBS], [Network Broadcast Sound])
|
||||
AST_EXT_LIB([ncurses], [initscr], [curses.h], [NCURSES], [ncurses], [])
|
||||
AST_EXT_LIB([newt], [newtBell], [newt.h], [NEWT], [newt])
|
||||
AST_EXT_LIB([odbc], [SQLConnect], [sql.h], [UNIXODBC], [unixODBC])
|
||||
AST_EXT_LIB([ogg], [ogg_sync_init], [], [OGG], [OGG])
|
||||
AST_EXT_LIB([osptk], [OSPPCryptoDecrypt], [osp/osp.h], [OSPTK], [OSP Toolkit], [-lcrypto -lssl])
|
||||
AST_EXT_LIB([popt], [poptStrerror], [popt.h], [POPT], [popt])
|
||||
AST_EXT_LIB([pri], [pri_call], [libpri.h], [LIBPRI], [ISDN PRI])
|
||||
AST_EXT_LIB([radiusclient-ng], [rc_read_config], [radiusclient-ng.h], [RADIUSCLIENT], [Radius Client])
|
||||
AST_EXT_LIB([speex], [speex_encode], [speex/speex.h], [SPEEX], [Speex], [-lm])
|
||||
AST_EXT_LIB([sqlite], [sqlite_exec], [sqlite.h], [SQLITE], [SQLite])
|
||||
AST_EXT_LIB([ssl], [ssl2_connect], [openssl/ssl.h], [OPENSSL], [OpenSSL], [-lcrypto])
|
||||
AST_EXT_LIB([tds], [tds_version], [tds.h], [FREETDS], [FreeTDS])
|
||||
AST_EXT_LIB([termcap], [tgetent], [], [TERMCAP], [Termcap])
|
||||
AST_EXT_LIB([tinfo], [tgetent], [], [TINFO], [Term Info])
|
||||
AST_EXT_LIB([vorbis], [vorbis_info_init], [vorbis/codec.h], [VORBIS], [Vorbis], [-lm -lvorbisenc])
|
||||
AST_EXT_LIB([z], [compress], [zlib.h], [ZLIB], [zlib])
|
||||
|
||||
EDITLINE_LIBS=""
|
||||
if test "x$TERMCAP_LIB" != "x" ; then
|
||||
EDITLINE_LIBS="$TERMCAP_LIB"
|
||||
elif test "x$TINFO_LIB" != "x" ; then
|
||||
EDITLINE_LIBS="$TINFO_LIB"
|
||||
elif test "x$CURSES_LIB" != "x" ; then
|
||||
EDITLINE_LIBS="$CURSES_LIB"
|
||||
elif test "x$NCURSES_LIB" != "x" ; then
|
||||
EDITLINE_LIBS="$NCURSES_LIB"
|
||||
else
|
||||
echo "*** termcap support not found"
|
||||
exit 1
|
||||
fi
|
||||
AC_SUBST(EDITLINE_LIBS)
|
||||
|
||||
PBX_LIBOSS=0
|
||||
AC_CHECK_HEADER([linux/soundcard.h],
|
||||
[
|
||||
PBX_LIBOSS=1
|
||||
AC_DEFINE_UNQUOTED([HAVE_OSS], 1, [Define to indicate the Open Sound System library])
|
||||
])
|
||||
if test "$PBX_LIBOSS" = "0"; then
|
||||
AC_CHECK_HEADER([sys/soundcard.h],
|
||||
[
|
||||
PBX_LIBossaudio=1
|
||||
AC_DEFINE_UNQUOTED([HAVE_OSS], 1, [Define to indicate the Open Sound System library])
|
||||
])
|
||||
fi
|
||||
if test "$PBX_LIBOSS" = "0"; then
|
||||
AST_EXT_LIB([ossaudio], [oss_ioctl_mixer], [soundcard.h], [OSS], [Open Sound System])
|
||||
fi
|
||||
|
||||
AC_SUBST([PBX_LIBOSS])
|
||||
|
||||
if test "${PBX_OSTYPE}" = "Linux" ; then
|
||||
AST_EXT_LIB([tonezone], [tone_zone_find], [tonezone.h], [TONEZONE], [tonezone])
|
||||
else
|
||||
AST_EXT_LIB([tonezone], [tone_zone_find], [tonezone.h], [TONEZONE], [tonezone], [-lm])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([zaptel], AC_HELP_STRING([--with-zaptel=PATH], [use Zaptel files in PATH]), [
|
||||
case ${withval} in
|
||||
n|no)
|
||||
USE_ZAPTEL=no
|
||||
;;
|
||||
y|ye|yes)
|
||||
ZAPTEL_MANDATORY=yes
|
||||
;;
|
||||
*)
|
||||
ZAPTEL_DIR="${withval}"
|
||||
ZAPTEL_MANDATORY=yes
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
PBX_ZAPTEL=0
|
||||
if test "${USE_ZAPTEL}" != "no"; then
|
||||
echo -n "checking for usability of zaptel.h... "
|
||||
if test "${PBX_OSTYPE}" = "Linux" ; then
|
||||
zapheader=linux/zaptel.h
|
||||
else
|
||||
zapheader=zaptel.h
|
||||
fi
|
||||
saved_cppflags="${CPPFLAGS}"
|
||||
if test "x${ZAPTEL_DIR}" != "x"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include"
|
||||
fi
|
||||
AC_COMPILE_IFELSE(
|
||||
[
|
||||
AC_LANG_PROGRAM(
|
||||
[#include <${zapheader}>],
|
||||
[struct zt_transcode_header test;])
|
||||
],
|
||||
[ AC_MSG_RESULT(yes)
|
||||
ac_cv_zaptel_h="yes"
|
||||
],
|
||||
[ AC_MSG_RESULT(no)
|
||||
ac_cv_zaptel_h="no"
|
||||
]
|
||||
)
|
||||
CPPFLAGS="${saved_cppflags}"
|
||||
if test "${ac_cv_zaptel_h}" = "yes"; then
|
||||
if test "${ZAPTEL_DIR}" != ""; then
|
||||
ZAPTEL_INCLUDE="-I${ZAPTEL_DIR}/include"
|
||||
AC_SUBST([ZAPTEL_INCLUDE])
|
||||
fi
|
||||
PBX_ZAPTEL=1
|
||||
AC_DEFINE([HAVE_ZAPTEL], 1, [Define if your system has the Zaptel headers.])
|
||||
elif test ! -z "${ZAPTEL_MANDATORY}";
|
||||
then
|
||||
echo "***"
|
||||
echo "*** The Zaptel installation on this system appears to be broken."
|
||||
echo "*** Either correct the installation, or run configure"
|
||||
echo "*** including --without-zaptel."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST([PBX_ZAPTEL])
|
||||
|
||||
GSM_INTERNAL="yes"
|
||||
GSM_SYSTEM="yes"
|
||||
|
@ -370,6 +255,166 @@ AC_SUBST([gsm_LIB])
|
|||
AC_SUBST([gsm_INCLUDE])
|
||||
AC_SUBST([PBX_LIBgsm])
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
|
||||
AC_ARG_WITH([kde], AC_HELP_STRING([--with-kde=PATH],[use KDE files in PATH]),[
|
||||
case ${withval} in
|
||||
n|no)
|
||||
USE_KDE=no
|
||||
;;
|
||||
y|ye|yes)
|
||||
KDE_MANDATORY="yes"
|
||||
;;
|
||||
*)
|
||||
KDE_DIR="${withval}"
|
||||
KDE_MANDATORY="yes"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
PBX_KDE=0
|
||||
if test "${USE_KDE}" != "no"; then
|
||||
echo -n "checking for crashHandler in -lkdecore... "
|
||||
saved_ldflags="${LDFLAGS}"
|
||||
LDFLAGS="-I${KDE_DIR}/include ${LDFLAGS} -L${KDE_DIR}/lib -lkdecore"
|
||||
AC_LINK_IFELSE(
|
||||
[
|
||||
AC_LANG_PROGRAM(
|
||||
[#include "kcrash.h"],
|
||||
[KCrash::defaultCrashHandler(1);])
|
||||
],
|
||||
[ac_cv_lib_kde_crash="yes"],
|
||||
[ac_cv_lib_kde_crash="no"])
|
||||
|
||||
LDFLAGS="${saved_ldflags}"
|
||||
|
||||
if test "${ac_cv_lib_kde_crash}" = "yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
if test "${ac_cv_lib_kde_crash}" = "yes"; then
|
||||
KDE_LIBS="-lkdecore -lkdeui"
|
||||
if test "${KDE_DIR}" != ""; then
|
||||
KDE_LIBS="-L${KDE_DIR}/lib ${KDE_LIBS}"
|
||||
KDE_INCLUDE="-I${KDE_DIR}/include"
|
||||
AC_SUBST([KDE_INCLUDE])
|
||||
fi
|
||||
AC_SUBST([KDE_LIBS])
|
||||
PBX_KDE=1
|
||||
AC_DEFINE([HAVE_LIBKDE], 1, [Define if your system has the KDE library])
|
||||
elif test ! -z "${KDE_MANDATORY}";
|
||||
then
|
||||
echo "***"
|
||||
echo "*** The KDE installation on this system appears to be broken."
|
||||
echo "*** Either correct the installation, or run configure"
|
||||
echo "*** including --without-kde."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([PBX_KDE])
|
||||
|
||||
if test x"${PBX_KDE}" = x1; then
|
||||
AC_PATH_TOOL(KDEINIT, kdeinit, No)
|
||||
if test ! x"${KDEINIT}" = xNo; then
|
||||
KDEDIR=$(${DIRNAME} ${KDEINIT})
|
||||
KDEDIR=$(${DIRNAME} ${KDEDIR})
|
||||
fi
|
||||
AC_SUBST([KDEDIR])
|
||||
fi
|
||||
|
||||
AC_LANG_POP
|
||||
|
||||
AST_EXT_LIB([iksemel], [iks_start_sasl], [iksemel.h], [IKSEMEL], [Iksemel Jabber Library])
|
||||
AST_EXT_LIB([nbs], [nbs_connect], [nbs.h], [NBS], [Network Broadcast Sound])
|
||||
AST_EXT_LIB([ncurses], [initscr], [curses.h], [NCURSES], [ncurses], [])
|
||||
|
||||
AC_ARG_WITH([netsnmp], AC_HELP_STRING([--with-netsnmp=PATH],[use Net-SNMP in PATH]),[
|
||||
case ${withval} in
|
||||
n|no)
|
||||
USE_NETSNMP=no
|
||||
;;
|
||||
y|ye|yes)
|
||||
NETSNMP_MANDATORY="yes"
|
||||
;;
|
||||
*)
|
||||
NETSNMP_DIR="${withval}"
|
||||
NETSNMP_MANDATORY="yes"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
PBX_NETSNMP=0
|
||||
NETSNMP_CONFIG=No
|
||||
if test "${USE_NETSNMP}" != "no"; then
|
||||
if test "x${NETSNMP_DIR}" != "x"; then
|
||||
AC_PATH_TOOL([NETSNMP_CONFIG], [net-snmp-config], No, [${NETSNMP_DIR}/bin])
|
||||
if test x"${NETSNMP_CONFIG}" = xNo; then
|
||||
echo "***"
|
||||
echo "*** net-snmp-config was not found in the path you specified:"
|
||||
echo "*** ${NETSNMP_DIR}/bin"
|
||||
echo "*** Either correct the installation, or run configure"
|
||||
echo "*** including --without-netsnmp"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
AC_PATH_TOOL([NETSNMP_CONFIG], [net-snmp-config], No)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"${NETSNMP_CONFIG}" != xNo; then
|
||||
NETSNMP_libs=`net-snmp-config --agent-libs`
|
||||
|
||||
AC_CHECK_LIB([netsnmp], [snmp_register_callback], AC_DEFINE_UNQUOTED([HAVE_NETSNMP], 1,
|
||||
[Define to indicate the Net-SNMP library]), [], ${NETSNMP_libs})
|
||||
|
||||
if test "${ac_cv_lib_netsnmp_snmp_register_callback}" = "yes"; then
|
||||
NETSNMP_LIB="${NETSNMP_libs}"
|
||||
PBX_NETSNMP=1
|
||||
elif test ! -z "${NETSNMP_MANDATORY}";
|
||||
then
|
||||
echo "***"
|
||||
echo "*** The Net-SNMP installation on this system appears to be broken."
|
||||
echo "*** Either correct the installation, or run configure"
|
||||
echo "*** including --without-netsnmp"
|
||||
exit 1
|
||||
fi
|
||||
elif test ! -z "${NETSNMP_MANDATORY}";
|
||||
then
|
||||
echo "***"
|
||||
echo "*** The Net-SNMP installation on this system appears to be broken."
|
||||
echo "*** Either correct the installation, or run configure"
|
||||
echo "*** including --without-netsnmp"
|
||||
exit 1
|
||||
fi
|
||||
AC_SUBST([NETSNMP_LIB])
|
||||
AC_SUBST([PBX_NETSNMP])
|
||||
|
||||
AST_EXT_LIB([newt], [newtBell], [newt.h], [NEWT], [newt])
|
||||
AST_EXT_LIB([odbc], [SQLConnect], [sql.h], [UNIXODBC], [unixODBC])
|
||||
AST_EXT_LIB([ogg], [ogg_sync_init], [], [OGG], [OGG])
|
||||
AST_EXT_LIB([osptk], [OSPPCryptoDecrypt], [osp/osp.h], [OSPTK], [OSP Toolkit], [-lcrypto -lssl])
|
||||
|
||||
PBX_LIBOSS=0
|
||||
AC_CHECK_HEADER([linux/soundcard.h],
|
||||
[
|
||||
PBX_LIBOSS=1
|
||||
AC_DEFINE_UNQUOTED([HAVE_OSS], 1, [Define to indicate the Open Sound System library])
|
||||
])
|
||||
if test "$PBX_LIBOSS" = "0"; then
|
||||
AC_CHECK_HEADER([sys/soundcard.h],
|
||||
[
|
||||
PBX_LIBossaudio=1
|
||||
AC_DEFINE_UNQUOTED([HAVE_OSS], 1, [Define to indicate the Open Sound System library])
|
||||
])
|
||||
fi
|
||||
if test "$PBX_LIBOSS" = "0"; then
|
||||
AST_EXT_LIB([ossaudio], [oss_ioctl_mixer], [soundcard.h], [OSS], [Open Sound System])
|
||||
fi
|
||||
|
||||
AC_SUBST([PBX_LIBOSS])
|
||||
|
||||
AC_ARG_WITH([pq], AC_HELP_STRING([--with-pq=PATH],[use PostgreSQL files in PATH]),[
|
||||
case ${withval} in
|
||||
n|no)
|
||||
|
@ -422,93 +467,80 @@ if test x"${PG_CONFIG}" != xNo; then
|
|||
echo "*** including --without-pq"
|
||||
exit 1
|
||||
fi
|
||||
elif test ! -z "${PQ_MANDATORY}";
|
||||
then
|
||||
echo "***"
|
||||
echo "*** The PostgreSQL installation on this system appears to be broken."
|
||||
echo "*** Either correct the installation, or run configure"
|
||||
echo "*** including --without-pq"
|
||||
exit 1
|
||||
fi
|
||||
AC_SUBST([pq_INCLUDE])
|
||||
AC_SUBST([pq_LIB])
|
||||
AC_SUBST([PBX_LIBpq])
|
||||
|
||||
NETSNMP_LIBS=
|
||||
PBX_NETSNMP=0
|
||||
AC_PATH_TOOL([NET_SNMP_CONFIG], [net-snmp-config], No)
|
||||
if test "x${NET_SNMP_CONFIG}" != "xNo" ; then
|
||||
NETSNMP_LIBS=`${NET_SNMP_CONFIG} --agent-libs`
|
||||
PBX_NETSNMP=1
|
||||
fi
|
||||
AC_SUBST([NETSNMP_LIBS])
|
||||
AC_SUBST([PBX_NETSNMP])
|
||||
AST_EXT_LIB([popt], [poptStrerror], [popt.h], [POPT], [popt])
|
||||
AST_EXT_LIB([pri], [pri_call], [libpri.h], [LIBPRI], [ISDN PRI])
|
||||
|
||||
AC_CHECK_HEADER([h323.h], [PBX_H323=1], [PBX_H323=0])
|
||||
AC_SUBST(PBX_H323)
|
||||
PLATFORM_PTLIB="ptlib_${OSTYPE}_${MACHTYPE}_r"
|
||||
|
||||
AC_CHECK_HEADER([linux/ixjuser.h], [PBX_IXJUSER=1], [PBX_IXJUSER=0], [
|
||||
#include <linux/version.h>
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
||||
#include <linux/compiler.h>
|
||||
#endif
|
||||
])
|
||||
AC_SUBST(PBX_IXJUSER)
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
|
||||
AC_ARG_WITH([vpb], AC_HELP_STRING([--with-vpb=PATH],[use vpb files in PATH]),[
|
||||
AC_ARG_WITH([pwlib], AC_HELP_STRING([--with-pwlib=PATH],[use PWLib files in PATH]),[
|
||||
case ${withval} in
|
||||
n|no)
|
||||
USE_VPB=no
|
||||
USE_PWLIB=no
|
||||
;;
|
||||
y|ye|yes)
|
||||
VPB_MANDATORY="yes"
|
||||
;;
|
||||
*)
|
||||
VPB_DIR="${withval}"
|
||||
VPB_MANDATORY="yes"
|
||||
PWLIB_DIR="${withval}"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
if test "${USE_VPB}" != "no"; then
|
||||
echo -n "checking for vpb_open in -lvpb... "
|
||||
saved_libs="${LIBS}"
|
||||
saved_cppflags="${CPPFLAGS}"
|
||||
if test "x${VPB_DIR}" != "x"; then
|
||||
LIBS="${LIBS} -L${VPB_DIR}/lib"
|
||||
CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
|
||||
fi
|
||||
LIBS="${LIBS} -lvpb -lpthread"
|
||||
AC_LINK_IFELSE(
|
||||
if test "${USE_PWLIB}" != "no"; then
|
||||
echo -n "checking for existence of pwlib... "
|
||||
|
||||
saved_ldflags="${LDFLAGS}"
|
||||
LDFLAGS="${LDFLAGS} -L${PWLIB_DIR} -l${PLATFORM_PTLIB}"
|
||||
|
||||
AC_LINK_IFELSE(
|
||||
[
|
||||
AC_LANG_PROGRAM(
|
||||
[#include <vpbapi.h>],
|
||||
[int q = vpb_open(0,0);])
|
||||
[#include "${PWDIR_DIR}ptime.h"],
|
||||
[int q = PTime::IsDaylightSaving();])
|
||||
],
|
||||
[ AC_MSG_RESULT(yes)
|
||||
ac_cv_lib_vpb_vpb_open="yes"
|
||||
ac_cv_lib_pwlib="yes"
|
||||
],
|
||||
[ AC_MSG_RESULT(no)
|
||||
ac_cv_lib_vpb_vpb_open="no"
|
||||
ac_cv_lib_pwlib="no"
|
||||
]
|
||||
)
|
||||
LIBS="${saved_libs}"
|
||||
CPPFLAGS="${saved_cppflags}"
|
||||
PBX_LIBvpb=0
|
||||
if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
|
||||
VPB_LIB="-lvpb"
|
||||
if test "${VPB_DIR}" != ""; then
|
||||
VPB_LIB="-L${VPB_DIR}/lib ${VPB_LIB}"
|
||||
VPB_INCLUDE="-I${VPB_DIR}/include"
|
||||
AC_SUBST([VPB_INCLUDE])
|
||||
fi
|
||||
AC_SUBST([VPB_LIB])
|
||||
PBX_LIBvpb=1
|
||||
AC_DEFINE([HAVE_LIBVPB], 1, [Define if your system has the VoiceTronix (vpb) libraries.])
|
||||
elif test ! -z "${VPB_MANDATORY}";
|
||||
LDFLAGS="${saved_ldflags}"
|
||||
|
||||
PBX_LIBPWLIB=0
|
||||
|
||||
if test "${ac_cv_lib_pwlib}" = "yes"; then
|
||||
PWLIB_LIB="-l{PLATFORM_PWLIB}"
|
||||
if test "${PWLIB_DIR}" != ""; then
|
||||
PWLIB_LIB="-L${PWLIB_DIR}/lib ${PWLIB_LIB}"
|
||||
PWLIB_INCLUDE="-I${PWLIB_DIR}/include"
|
||||
AC_SUBST([PWLIB_INCLUDE])
|
||||
fi
|
||||
AC_SUBST([PWLIB_LIB])
|
||||
PBX_LIBPWLIB=1
|
||||
AC_DEFINE([HAVE_LIBPWLIB], 1, [Define if your system has the pwlib libraries.])
|
||||
elif test ! -z "${PWLIB_DIR}";
|
||||
then
|
||||
echo "***"
|
||||
echo "*** The VoiceTronix (vpb) installation on this system appears to be broken."
|
||||
echo "*** The PWLIB installation on this system appears to be broken."
|
||||
echo "*** Either correct the installation, or run configure"
|
||||
echo "*** including --without-vpb."
|
||||
echo "*** including --without-pwlib"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([PBX_LIBvpb])
|
||||
AC_SUBST([PBX_LIBPWLIB])
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
|
||||
AC_ARG_WITH([qt], AC_HELP_STRING([--with-qt=PATH],[use Qt files in PATH]),[
|
||||
case ${withval} in
|
||||
|
@ -596,74 +628,170 @@ if test "${USE_QT}" != "no"; then
|
|||
fi
|
||||
AC_SUBST([PBX_QT])
|
||||
|
||||
AC_ARG_WITH([kde], AC_HELP_STRING([--with-kde=PATH],[use KDE files in PATH]),[
|
||||
AC_LANG_POP
|
||||
|
||||
AST_EXT_LIB([radiusclient-ng], [rc_read_config], [radiusclient-ng.h], [RADIUSCLIENT], [Radius Client])
|
||||
AST_EXT_LIB([speex], [speex_encode], [speex/speex.h], [SPEEX], [Speex], [-lm])
|
||||
AST_EXT_LIB([sqlite], [sqlite_exec], [sqlite.h], [SQLITE], [SQLite])
|
||||
AST_EXT_LIB([ssl], [ssl2_connect], [openssl/ssl.h], [OPENSSL], [OpenSSL], [-lcrypto])
|
||||
AST_EXT_LIB([tds], [tds_version], [tds.h], [FREETDS], [FreeTDS])
|
||||
AST_EXT_LIB([termcap], [tgetent], [], [TERMCAP], [Termcap])
|
||||
AST_EXT_LIB([tinfo], [tgetent], [], [TINFO], [Term Info])
|
||||
|
||||
if test "${PBX_OSTYPE}" = "Linux" ; then
|
||||
AST_EXT_LIB([tonezone], [tone_zone_find], [tonezone.h], [TONEZONE], [tonezone])
|
||||
else
|
||||
AST_EXT_LIB([tonezone], [tone_zone_find], [tonezone.h], [TONEZONE], [tonezone], [-lm])
|
||||
fi
|
||||
|
||||
AST_EXT_LIB([vorbis], [vorbis_info_init], [vorbis/codec.h], [VORBIS], [Vorbis], [-lm -lvorbisenc])
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
|
||||
AC_ARG_WITH([vpb], AC_HELP_STRING([--with-vpb=PATH],[use vpb files in PATH]),[
|
||||
case ${withval} in
|
||||
n|no)
|
||||
USE_KDE=no
|
||||
USE_VPB=no
|
||||
;;
|
||||
y|ye|yes)
|
||||
KDE_MANDATORY="yes"
|
||||
VPB_MANDATORY="yes"
|
||||
;;
|
||||
*)
|
||||
KDE_DIR="${withval}"
|
||||
KDE_MANDATORY="yes"
|
||||
VPB_DIR="${withval}"
|
||||
VPB_MANDATORY="yes"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
if test "${USE_VPB}" != "no"; then
|
||||
echo -n "checking for vpb_open in -lvpb... "
|
||||
saved_libs="${LIBS}"
|
||||
saved_cppflags="${CPPFLAGS}"
|
||||
if test "x${VPB_DIR}" != "x"; then
|
||||
LIBS="${LIBS} -L${VPB_DIR}/lib"
|
||||
CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
|
||||
fi
|
||||
LIBS="${LIBS} -lvpb -lpthread"
|
||||
AC_LINK_IFELSE(
|
||||
[
|
||||
AC_LANG_PROGRAM(
|
||||
[#include <vpbapi.h>],
|
||||
[int q = vpb_open(0,0);])
|
||||
],
|
||||
[ AC_MSG_RESULT(yes)
|
||||
ac_cv_lib_vpb_vpb_open="yes"
|
||||
],
|
||||
[ AC_MSG_RESULT(no)
|
||||
ac_cv_lib_vpb_vpb_open="no"
|
||||
]
|
||||
)
|
||||
LIBS="${saved_libs}"
|
||||
CPPFLAGS="${saved_cppflags}"
|
||||
PBX_LIBvpb=0
|
||||
if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
|
||||
VPB_LIB="-lvpb"
|
||||
if test "${VPB_DIR}" != ""; then
|
||||
VPB_LIB="-L${VPB_DIR}/lib ${VPB_LIB}"
|
||||
VPB_INCLUDE="-I${VPB_DIR}/include"
|
||||
AC_SUBST([VPB_INCLUDE])
|
||||
fi
|
||||
AC_SUBST([VPB_LIB])
|
||||
PBX_LIBvpb=1
|
||||
AC_DEFINE([HAVE_LIBVPB], 1, [Define if your system has the VoiceTronix (vpb) libraries.])
|
||||
elif test ! -z "${VPB_MANDATORY}";
|
||||
then
|
||||
echo "***"
|
||||
echo "*** The VoiceTronix (vpb) installation on this system appears to be broken."
|
||||
echo "*** Either correct the installation, or run configure"
|
||||
echo "*** including --without-vpb."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([PBX_LIBvpb])
|
||||
|
||||
AC_LANG_POP
|
||||
|
||||
AST_EXT_LIB([z], [compress], [zlib.h], [ZLIB], [zlib])
|
||||
|
||||
AC_ARG_WITH([zaptel], AC_HELP_STRING([--with-zaptel=PATH], [use Zaptel files in PATH]), [
|
||||
case ${withval} in
|
||||
n|no)
|
||||
USE_ZAPTEL=no
|
||||
;;
|
||||
y|ye|yes)
|
||||
ZAPTEL_MANDATORY=yes
|
||||
;;
|
||||
*)
|
||||
ZAPTEL_DIR="${withval}"
|
||||
ZAPTEL_MANDATORY=yes
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
PBX_KDE=0
|
||||
if test "${USE_KDE}" != "no"; then
|
||||
echo -n "checking for crashHandler in -lkdecore... "
|
||||
saved_ldflags="${LDFLAGS}"
|
||||
LDFLAGS="-I${KDE_DIR}/include ${LDFLAGS} -L${KDE_DIR}/lib -lkdecore"
|
||||
AC_LINK_IFELSE(
|
||||
PBX_ZAPTEL=0
|
||||
if test "${USE_ZAPTEL}" != "no"; then
|
||||
echo -n "checking for zt_transcode_header in zaptel.h... "
|
||||
saved_cppflags="${CPPFLAGS}"
|
||||
if test "x${ZAPTEL_DIR}" != "x"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include"
|
||||
fi
|
||||
AC_COMPILE_IFELSE(
|
||||
[
|
||||
AC_LANG_PROGRAM(
|
||||
[#include "kcrash.h"],
|
||||
[KCrash::defaultCrashHandler(1);])
|
||||
AC_LANG_PROGRAM(
|
||||
[#include <zaptel.h>],
|
||||
[struct zt_transcode_header test;])
|
||||
],
|
||||
[ac_cv_lib_kde_crash="yes"],
|
||||
[ac_cv_lib_kde_crash="no"])
|
||||
|
||||
LDFLAGS="${saved_ldflags}"
|
||||
|
||||
if test "${ac_cv_lib_kde_crash}" = "yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
[ AC_MSG_RESULT(yes)
|
||||
ac_cv_zaptel_h="yes"
|
||||
],
|
||||
[ AC_MSG_RESULT(no)
|
||||
ac_cv_zaptel_h="no"
|
||||
]
|
||||
)
|
||||
CPPFLAGS="${saved_cppflags}"
|
||||
if test "${ac_cv_zaptel_h}" = "yes"; then
|
||||
if test "${ZAPTEL_DIR}" != ""; then
|
||||
ZAPTEL_INCLUDE="-I${ZAPTEL_DIR}/include"
|
||||
AC_SUBST([ZAPTEL_INCLUDE])
|
||||
fi
|
||||
|
||||
if test "${ac_cv_lib_kde_crash}" = "yes"; then
|
||||
KDE_LIBS="-lkdecore -lkdeui"
|
||||
if test "${KDE_DIR}" != ""; then
|
||||
KDE_LIBS="-L${KDE_DIR}/lib ${KDE_LIBS}"
|
||||
KDE_INCLUDE="-I${KDE_DIR}/include"
|
||||
AC_SUBST([KDE_INCLUDE])
|
||||
fi
|
||||
AC_SUBST([KDE_LIBS])
|
||||
PBX_KDE=1
|
||||
AC_DEFINE([HAVE_LIBKDE], 1, [Define if your system has the KDE library])
|
||||
elif test ! -z "${KDE_MANDATORY}";
|
||||
PBX_ZAPTEL=1
|
||||
AC_DEFINE([HAVE_ZAPTEL], 1, [Define if your system has the Zaptel headers.])
|
||||
elif test ! -z "${ZAPTEL_MANDATORY}";
|
||||
then
|
||||
echo "***"
|
||||
echo "*** The KDE installation on this system appears to be broken."
|
||||
echo "*** The Zaptel installation on this system appears to be broken."
|
||||
echo "*** Either correct the installation, or run configure"
|
||||
echo "*** including --without-kde."
|
||||
echo "*** including --without-zaptel."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([PBX_KDE])
|
||||
|
||||
if test x"${PBX_KDE}" = x1; then
|
||||
AC_PATH_TOOL(KDEINIT, kdeinit, No)
|
||||
if test ! x"${KDEINIT}" = xNo; then
|
||||
KDEDIR=$(${DIRNAME} ${KDEINIT})
|
||||
KDEDIR=$(${DIRNAME} ${KDEDIR})
|
||||
fi
|
||||
AC_SUBST([KDEDIR])
|
||||
AC_SUBST([PBX_ZAPTEL])
|
||||
|
||||
EDITLINE_LIBS=""
|
||||
if test "x$TERMCAP_LIB" != "x" ; then
|
||||
EDITLINE_LIBS="$TERMCAP_LIB"
|
||||
elif test "x$TINFO_LIB" != "x" ; then
|
||||
EDITLINE_LIBS="$TINFO_LIB"
|
||||
elif test "x$CURSES_LIB" != "x" ; then
|
||||
EDITLINE_LIBS="$CURSES_LIB"
|
||||
elif test "x$NCURSES_LIB" != "x" ; then
|
||||
EDITLINE_LIBS="$NCURSES_LIB"
|
||||
else
|
||||
echo "*** termcap support not found"
|
||||
exit 1
|
||||
fi
|
||||
AC_SUBST(EDITLINE_LIBS)
|
||||
|
||||
AC_LANG_POP
|
||||
AC_CHECK_HEADER([h323.h], [PBX_H323=1], [PBX_H323=0])
|
||||
AC_SUBST(PBX_H323)
|
||||
|
||||
AC_CHECK_HEADER([linux/ixjuser.h], [PBX_IXJUSER=1], [PBX_IXJUSER=0], [
|
||||
#include <linux/version.h>
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
||||
#include <linux/compiler.h>
|
||||
#endif
|
||||
])
|
||||
AC_SUBST(PBX_IXJUSER)
|
||||
|
||||
PBX_GTK=0
|
||||
AC_CHECK_TOOL(GTKCONFIG, gtk-config, No)
|
||||
|
@ -677,64 +805,6 @@ AC_SUBST(PBX_GTK)
|
|||
AC_SUBST(GTK_INCLUDE)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
|
||||
PLATFORM_PTLIB="ptlib_${OSTYPE}_${MACHTYPE}_r"
|
||||
|
||||
AC_ARG_WITH([pwlib], AC_HELP_STRING([--with-pwlib=PATH],[use PWLib files in PATH]),[
|
||||
case ${withval} in
|
||||
n|no)
|
||||
USE_PWLIB=no
|
||||
;;
|
||||
y|ye|yes)
|
||||
;;
|
||||
*)
|
||||
PWLIB_DIR="${withval}"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
if test "${USE_PWLIB}" != "no"; then
|
||||
echo -n "checking for existence of pwlib... "
|
||||
|
||||
saved_ldflags="${LDFLAGS}"
|
||||
LDFLAGS="${LDFLAGS} -L${PWLIB_DIR} -l${PLATFORM_PTLIB}"
|
||||
|
||||
AC_LINK_IFELSE(
|
||||
[
|
||||
AC_LANG_PROGRAM(
|
||||
[#include "${PWDIR_DIR}ptime.h"],
|
||||
[int q = PTime::IsDaylightSaving();])
|
||||
],
|
||||
[ AC_MSG_RESULT(yes)
|
||||
ac_cv_lib_pwlib="yes"
|
||||
],
|
||||
[ AC_MSG_RESULT(no)
|
||||
ac_cv_lib_pwlib="no"
|
||||
]
|
||||
)
|
||||
LDFLAGS="${saved_ldflags}"
|
||||
|
||||
PBX_LIBPWLIB=0
|
||||
|
||||
if test "${ac_cv_lib_pwlib}" = "yes"; then
|
||||
PWLIB_LIB="-l{PLATFORM_PWLIB}"
|
||||
if test "${PWLIB_DIR}" != ""; then
|
||||
PWLIB_LIB="-L${PWLIB_DIR}/lib ${PWLIB_LIB}"
|
||||
PWLIB_INCLUDE="-I${PWLIB_DIR}/include"
|
||||
AC_SUBST([PWLIB_INCLUDE])
|
||||
fi
|
||||
AC_SUBST([PWLIB_LIB])
|
||||
PBX_LIBPWLIB=1
|
||||
AC_DEFINE([HAVE_LIBPWLIB], 1, [Define if your system has the pwlib libraries.])
|
||||
elif test ! -z "${PWLIB_DIR}";
|
||||
then
|
||||
echo "***"
|
||||
echo "*** The PWLIB installation on this system appears to be broken."
|
||||
echo "*** Either correct the installation, or run configure"
|
||||
echo "*** including --without-pwlib"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([PBX_LIBPWLIB])
|
||||
|
||||
PBX_CURL=0
|
||||
AC_PATH_TOOL([CURL], [curl-config], No)
|
||||
if test ! x"${CURL}" = xNo; then
|
||||
|
|
|
@ -5,51 +5,16 @@
|
|||
#
|
||||
# Copyright (C) 1999-2006, Digium, Inc.
|
||||
#
|
||||
# Mark Spencer <markster@digium.com>
|
||||
#
|
||||
# This program is free software, distributed under the terms of
|
||||
# the GNU General Public License
|
||||
#
|
||||
|
||||
.PHONY: clean clean-depend all depend uninstall
|
||||
|
||||
ifneq ($(wildcard ../menuselect.makeopts),)
|
||||
include ../menuselect.makeopts
|
||||
endif
|
||||
|
||||
SELECTED_MODS:=$(filter-out $(MENUSELECT_FORMATS),$(patsubst %.c,%,$(wildcard format_*.c)))
|
||||
|
||||
GSMLIB=../codecs/gsm/lib/libgsm.a
|
||||
all: _all
|
||||
|
||||
MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
|
||||
|
||||
all: $(MODS)
|
||||
|
||||
clean-depend:
|
||||
rm -f .depend
|
||||
|
||||
clean: clean-depend
|
||||
rm -f *.so *.o
|
||||
|
||||
%.so : %.o
|
||||
$(CC) $(SOLINK) -o $@ $<
|
||||
|
||||
ifneq ($(wildcard .depend),)
|
||||
include .depend
|
||||
endif
|
||||
|
||||
format_ogg_vorbis.so : format_ogg_vorbis.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(OGG_LIB) $(VORBIS_LIB)
|
||||
|
||||
format_ogg_vorbis.o: format_ogg_vorbis.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(OGG_INCLUDE) $(VORBIS_INCLUDE) $<
|
||||
|
||||
install: all
|
||||
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
||||
|
||||
uninstall:
|
||||
|
||||
depend: .depend
|
||||
|
||||
.depend:
|
||||
../build_tools/mkdep $(CFLAGS) `ls *.c`
|
||||
include ../Makefile.rules
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>libvorbis</depend>
|
||||
<depend>ogg</depend>
|
||||
<depend>libogg</depend>
|
||||
***/
|
||||
|
||||
#include "asterisk.h"
|
||||
|
|
|
@ -5,14 +5,10 @@
|
|||
#
|
||||
# Copyright (C) 2005-2006, Digium, Inc.
|
||||
#
|
||||
# Kevin P. Fleming <kpfleming@digium.com>
|
||||
#
|
||||
# This program is free software, distributed under the terms of
|
||||
# the GNU General Public License
|
||||
#
|
||||
|
||||
.PHONY: clean clean-depend all depend uninstall
|
||||
|
||||
ifneq ($(wildcard ../menuselect.makeopts),)
|
||||
include ../menuselect.makeopts
|
||||
endif
|
||||
|
@ -30,44 +26,6 @@ else
|
|||
endif
|
||||
endif
|
||||
|
||||
MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
|
||||
all: _all
|
||||
|
||||
all: $(MODS)
|
||||
|
||||
clean-depend:
|
||||
rm -f .depend
|
||||
|
||||
clean: clean-depend
|
||||
rm -f *.so *.o
|
||||
|
||||
%.so : %.o
|
||||
$(CC) $(SOLINK) -o $@ $<
|
||||
|
||||
func_curl.so: func_curl.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(CURL_LIB)
|
||||
|
||||
func_curl.o: func_curl.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(CURL_INCLUDE) $<
|
||||
|
||||
func_odbc.so: func_odbc.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(ODBC_LIB)
|
||||
|
||||
func_odbc.o: func_odbc.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(ODBC_INCLUDE) $<
|
||||
|
||||
install: all
|
||||
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
||||
|
||||
uninstall:
|
||||
|
||||
ifneq ($(wildcard .depend),)
|
||||
include .depend
|
||||
endif
|
||||
|
||||
depend: .depend
|
||||
|
||||
.depend:
|
||||
../build_tools/mkdep $(CFLAGS) `ls *.c`
|
||||
|
||||
env:
|
||||
env
|
||||
include ../Makefile.rules
|
||||
|
|
|
@ -200,6 +200,9 @@
|
|||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to indicate the Net-SNMP library */
|
||||
#undef HAVE_NETSNMP
|
||||
|
||||
/* Define to indicate the newt library */
|
||||
#undef HAVE_NEWT
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ struct ast_translator {
|
|||
int dstfmt; /*!< Destination format (note: bit position,
|
||||
converted to index during registration) */
|
||||
|
||||
void *(*newpvt)(struct ast_trans_pvt *); /*!< initialize private data
|
||||
int (*newpvt)(struct ast_trans_pvt *); /*!< initialize private data
|
||||
associated with the translator */
|
||||
|
||||
int (*framein)(struct ast_trans_pvt *pvt, struct ast_frame *in);
|
||||
|
|
52
makeopts.in
52
makeopts.in
|
@ -1,3 +1,7 @@
|
|||
# NOTE: Names of _INCLUDE and _LIB entries in this file must be
|
||||
# the exact uppercase equivalents of the names used for
|
||||
# dependencies in menuselect for the same package.
|
||||
|
||||
CC=@CC@
|
||||
HOST_CC=@CC@
|
||||
CXX=@CXX@
|
||||
|
@ -38,11 +42,11 @@ sysconfdir = @sysconfdir@
|
|||
|
||||
AST_DEVMODE=@AST_DEVMODE@
|
||||
|
||||
OGG_LIB=@OGG_LIB@
|
||||
OGG_INCLUDE=@OGG_INCLUDE@
|
||||
LIBOGG_LIB=@OGG_LIB@
|
||||
LIBOGG_INCLUDE=@OGG_INCLUDE@
|
||||
|
||||
VORBIS_LIB=@VORBIS_LIB@
|
||||
VORBIS_INCLUDE=@VORBIS_INCLUDE@
|
||||
LIBVORBIS_LIB=@VORBIS_LIB@
|
||||
LIBVORBIS_INCLUDE=@VORBIS_INCLUDE@
|
||||
|
||||
ASOUND_LIB=@ALSA_LIB@
|
||||
ASOUND_INCLUDE=@ALSA_INCLUDE@
|
||||
|
@ -53,25 +57,25 @@ NBS_INCLUDE=@NBS_INCLUDE@
|
|||
OSSAUDIO_LIB=@OSS_LIB@
|
||||
OSSAUDIO_INCLUDE=@OSS_INCLUDE@
|
||||
|
||||
SPEEX_LIB=@SPEEX_LIB@
|
||||
SPEEX_INCLUDE=@SPEEX_INCLUDE@
|
||||
LIBSPEEX_LIB=@SPEEX_LIB@
|
||||
LIBSPEEX_INCLUDE=@SPEEX_INCLUDE@
|
||||
|
||||
TONEZONE_LIB=@TONEZONE_LIB@
|
||||
TONEZONE_INCLUDE=@TONEZONE_INCLUDE@
|
||||
|
||||
ZAPTEL_INCLUDE=@ZAPTEL_INCLUDE@
|
||||
|
||||
VPB_LIB=@VPB_LIB@
|
||||
VPB_INCLUDE=@VPB_INCLUDE@
|
||||
VPBAPI_LIB=@VPB_LIB@
|
||||
VPBAPI_INCLUDE=@VPB_INCLUDE@
|
||||
|
||||
PRI_LIB=@LIBPRI_LIB@
|
||||
PRI_INCLUDE=@LIBPRI_INCLUDE@
|
||||
LIBPRI_LIB=@LIBPRI_LIB@
|
||||
LIBPRI_INCLUDE=@LIBPRI_INCLUDE@
|
||||
|
||||
OSPTK_LIB=@OSPTK_LIB@
|
||||
OSPTK_INCLUDE=@OSPTK_INCLUDE@
|
||||
LIBOSPTK_LIB=@OSPTK_LIB@
|
||||
LIBOSPTK_INCLUDE=@OSPTK_INCLUDE@
|
||||
|
||||
ODBC_LIB=@UNIXODBC_LIB@
|
||||
ODBC_INCLUDE=@UNIXODBC_INCLUDE@
|
||||
UNIXODBC_LIB=@UNIXODBC_LIB@
|
||||
UNIXODBC_INCLUDE=@UNIXODBC_INCLUDE@
|
||||
|
||||
PGSQL_LIB=@pq_LIB@
|
||||
PGSQL_INCLUDE=@pq_INCLUDE@
|
||||
|
@ -79,8 +83,8 @@ PGSQL_INCLUDE=@pq_INCLUDE@
|
|||
SQLITE_LIB=@SQLITE_LIB@
|
||||
SQLITE_INCLUDE=@SQLITE_INCLUDE@
|
||||
|
||||
TDS_LIB=@FREETDS_LIB@
|
||||
TDS_INCLUDE=@FREETDS_INCLUDE@
|
||||
FREETDS_LIB=@FREETDS_LIB@
|
||||
FREETDS_INCLUDE=@FREETDS_INCLUDE@
|
||||
|
||||
POPT_LIB=@POPT_LIB@
|
||||
POPT_INCLUDE=@POPT_INCLUDE@
|
||||
|
@ -97,23 +101,23 @@ IKSEMEL_INCLUDE=@IKSEMEL_INCLUDE@
|
|||
SSL_LIB=@OPENSSL_LIB@
|
||||
SSL_INCLUDE=@OPENSSL_INCLUDE@
|
||||
|
||||
Z_LIB=@ZLIB_LIB@
|
||||
Z_INCLUDE=@ZLIB_INCLUDE@
|
||||
ZLIB_LIB=@ZLIB_LIB@
|
||||
ZLIB_INCLUDE=@ZLIB_INCLUDE@
|
||||
|
||||
QT_LIB=@QT_LIB@
|
||||
QT_INCLUDE=@QT_INCLUDE@
|
||||
|
||||
KDEDIR=@KDEDIR@
|
||||
KDE_INCLUDE=@KDE_INCLUDE@
|
||||
KDE_LIBS=@KDE_LIBS@
|
||||
KDE_LIB=@KDE_LIBS@
|
||||
|
||||
GTK_INCLUDE=@GTK_INCLUDE@
|
||||
GTK_LIBS=@GTK_LIBS@
|
||||
GTK_LIB=@GTK_LIBS@
|
||||
|
||||
CURL_LIB=@CURLLIBS@
|
||||
|
||||
GSM_LIB=@gsm_LIB@
|
||||
GSM_INCLUDE=@gsm_INCLUDE@
|
||||
LIBGSM_LIB=@gsm_LIB@
|
||||
LIBGSM_INCLUDE=@gsm_INCLUDE@
|
||||
|
||||
CURSES_LIB=@CURSES_LIB@
|
||||
CURSES_INCLUDE=@CURSES_INCLUDE@
|
||||
|
@ -121,9 +125,9 @@ CURSES_INCLUDE=@CURSES_INCLUDE@
|
|||
NCURSES_LIB=@NCURSES_LIB@
|
||||
NCURSES_INCLUDE=@NCURSES_INCLUDE@
|
||||
|
||||
EDITLINE_LIBS=@EDITLINE_LIBS@
|
||||
EDITLINE_LIB=@EDITLINE_LIBS@
|
||||
|
||||
RADIUSCLIENT_LIB=@RADIUSCLIENT_LIB@
|
||||
RADIUSCLIENT_INCLUDE=@RADIUSCLIENT_INCLUDE@
|
||||
|
||||
NETSNMP_LIBS=@NETSNMP_LIBS@
|
||||
NETSNMP_LIB=@NETSNMP_LIBS@
|
||||
|
|
70
pbx/Makefile
70
pbx/Makefile
|
@ -5,91 +5,35 @@
|
|||
#
|
||||
# Copyright (C) 1999-2006, Digium, Inc.
|
||||
#
|
||||
# Mark Spencer <markster@digium.com>
|
||||
#
|
||||
# This program is free software, distributed under the terms of
|
||||
# the GNU General Public License
|
||||
#
|
||||
|
||||
.PHONY: clean clean-depend all depend uninstall
|
||||
|
||||
ifneq ($(wildcard ../menuselect.makeopts),)
|
||||
include ../menuselect.makeopts
|
||||
endif
|
||||
|
||||
SELECTED_MODS:=$(filter-out $(MENUSELECT_PBX),$(patsubst %.c,%,$(wildcard pbx_*.c)))
|
||||
|
||||
MOC=$(QTDIR)/bin/moc
|
||||
KDE_FLAGS=-I$(KDEDIR)/include -I$(KDEDIR)/include/kde -I$(QTDIR)/include
|
||||
KDE_LIBS=-L$(KDEDIR)/lib -L$(QTDIR)/lib -lqt -lkdecore -lkdeui
|
||||
|
||||
KDE_CONSOLE_OBJS=pbx_kdeconsole_main.o pbx_kdeconsole.o
|
||||
|
||||
MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
|
||||
|
||||
all: $(MODS)
|
||||
all: _all
|
||||
|
||||
clean-depend:
|
||||
rm -f .depend
|
||||
include ../Makefile.rules
|
||||
|
||||
clean: clean-depend
|
||||
rm -f *.so *.o
|
||||
clean::
|
||||
rm -f ael/*.o
|
||||
|
||||
pbx_gtkconsole.o: pbx_gtkconsole.c
|
||||
$(CC) $(CFLAGS) $(GTK_FLAGS) -c -o $@ $<
|
||||
|
||||
pbx_gtkconsole.so: pbx_gtkconsole.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(GTK_LIBS)
|
||||
|
||||
pbx_kdeconsole.o: pbx_kdeconsole.cc pbx_kdeconsole.moc
|
||||
$(CXX) $(CFLAGS) $(KDE_FLAGS) -c -o $@ $<
|
||||
|
||||
pbx_kdeconsole_main.o: pbx_kdeconsole_main.cc pbx_kdeconsole.h
|
||||
$(CXX) $(CFLAGS) $(KDE_FLAGS) -c -o $@ $<
|
||||
|
||||
pbx_kdeconsole.so: $(KDE_CONSOLE_OBJS)
|
||||
$(CC) $(SOLINK) -o $@ $(KDE_CONSOLE_OBJS) $(KDE_LIBS)
|
||||
|
||||
pbx_dundi.so: pbx_dundi.o dundi-parser.o
|
||||
$(CC) $(SOLINK) -o $@ $< dundi-parser.o $(Z_LIB)
|
||||
|
||||
pbx_dundi.o: pbx_dundi.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(Z_INCLUDE) $<
|
||||
|
||||
pbx_ael.o: ael/aelflex.o ael/aelbison.o ../include/asterisk/ael_structs.h
|
||||
|
||||
pbx_ael.so: pbx_ael.o ael/aelbison.o ael/aelflex.o
|
||||
$(CC) $(SOLINK) -o $@ pbx_ael.o ael/aelbison.o ael/aelflex.o
|
||||
|
||||
ael/aelflex.o: ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h
|
||||
$(CC) $(CFLAGS) -I. -c -o ael/aelflex.o ael/ael_lex.c
|
||||
$(CC) $(CFLAGS) -I. -c -o $@ $<
|
||||
|
||||
ael/aelbison.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h
|
||||
$(CC) $(CFLAGS) -I. -c -o ael/aelbison.o ael/ael.tab.c
|
||||
$(CC) $(CFLAGS) -I. -c -o $@ $<
|
||||
|
||||
pbx_ael.so: pbx_ael.o ael/aelbison.o ael/aelflex.o
|
||||
|
||||
ael/ael_lex.c:
|
||||
(cd ael; flex ael.flex; sed -i -e "/begin standard C headers/i#include \"asterisk.h\"" ael_lex.c)
|
||||
|
||||
ael/ael.tab.c ael/ael.tab.h:
|
||||
(cd ael; bison -v -d ael.y)
|
||||
|
||||
%.moc : %.h
|
||||
$(MOC) $< -o $@
|
||||
|
||||
%.so : %.o
|
||||
$(CC) $(SOLINK) -o $@ $<
|
||||
|
||||
ifneq ($(wildcard .depend),)
|
||||
include .depend
|
||||
endif
|
||||
|
||||
install: all
|
||||
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
||||
|
||||
uninstall:
|
||||
|
||||
depend: .depend
|
||||
|
||||
.depend:
|
||||
../build_tools/mkdep $(CFLAGS) `ls *.c`
|
||||
|
|
82
res/Makefile
82
res/Makefile
|
@ -3,16 +3,12 @@
|
|||
#
|
||||
# Makefile for resource modules
|
||||
#
|
||||
# Copyright (C) 1999-2006, Digium
|
||||
#
|
||||
# Mark Spencer <markster@digium.com>
|
||||
# Copyright (C) 1999-2006, Digium, Inc.
|
||||
#
|
||||
# This program is free software, distributed under the terms of
|
||||
# the GNU General Public License
|
||||
#
|
||||
|
||||
.PHONY: clean clean-depend all depend uninstall
|
||||
|
||||
ifneq ($(wildcard ../menuselect.makeopts),)
|
||||
include ../menuselect.makeopts
|
||||
endif
|
||||
|
@ -23,80 +19,10 @@ ifeq ($(OSARCH),FreeBSD)
|
|||
SELECTED_MODS:=$(filter-out $(shell if test ${BSDVERSION} -lt 500000 ; then echo "res_config_odbc"; fi),$(SELECTED_MODS))
|
||||
endif
|
||||
|
||||
MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
|
||||
all: _all
|
||||
|
||||
all: $(MODS)
|
||||
include ../Makefile.rules
|
||||
|
||||
install: all
|
||||
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
||||
@if [ x`which mpg123 2>/dev/null | grep -v '^no'` != x ] ; then \
|
||||
if mpg123 --longhelp 2>&1 | grep -q .59r 2>&1 >/dev/null ; then echo ; else \
|
||||
echo "*************************************************************";\
|
||||
echo "*** You have the WRONG version of mpg123... you need .59r ***";\
|
||||
echo "*** Use 'make mpg123' to get the right verison ***";\
|
||||
echo "*************************************************************";\
|
||||
fi ;\
|
||||
else \
|
||||
echo "*** You don't have mpg123 installed. You may need ***";\
|
||||
echo "*** it if you want to use MusicOnHold ***";\
|
||||
fi
|
||||
|
||||
uninstall:
|
||||
|
||||
res_crypto.so: res_crypto.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(SSL_LIB)
|
||||
|
||||
res_crypto.o: res_crypto.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(SSL_INCLUDE) $<
|
||||
|
||||
clean-depend:
|
||||
rm -f .depend
|
||||
|
||||
clean: clean-depend
|
||||
rm -f *.so *.o
|
||||
clean::
|
||||
rm -f snmp/*.o
|
||||
|
||||
res_odbc.so: res_odbc.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(ODBC_LIB)
|
||||
|
||||
res_odbc.o: res_odbc.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(ODBC_INCLUDE) $<
|
||||
|
||||
res_jabber.o: res_jabber.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(IKSEMEL_INCLUDE) $<
|
||||
|
||||
res_jabber.so: res_jabber.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(IKSEMEL_LIB)
|
||||
|
||||
res_osp.so: res_osp.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(OSPTK_LIB)
|
||||
|
||||
res_osp.o: res_osp.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(OSPTK_INCLUDE) $<
|
||||
|
||||
%.so : %.o
|
||||
$(CC) -o $@ $(SOLINK) $<
|
||||
|
||||
res_config_odbc.o: res_config_odbc.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(ODBC_INCLUDE) $<
|
||||
|
||||
res_snmp.so: res_snmp.o snmp/agent.o
|
||||
$(CC) $(SOLINK) -o $@ $^ $(NETSNMP_LIBS)
|
||||
|
||||
res_config_pgsql.so: res_config_pgsql.o
|
||||
$(CC) $(SOLINK) -o $@ $< $(PGSQL_LIB)
|
||||
|
||||
res_config_pgsql.o: res_config_pgsql.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $(PGSQL_INCLUDE) $<
|
||||
|
||||
ifneq ($(wildcard .depend),)
|
||||
include .depend
|
||||
endif
|
||||
|
||||
depend: .depend
|
||||
|
||||
.depend:
|
||||
../build_tools/mkdep $(CFLAGS) `ls *.c`
|
||||
|
||||
env:
|
||||
env
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<conflict>win32</conflict>
|
||||
<use>zaptel</use>
|
||||
***/
|
||||
|
||||
#include "asterisk.h"
|
||||
|
@ -49,11 +50,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
#include <sys/ioctl.h>
|
||||
|
||||
#ifdef HAVE_ZAPTEL
|
||||
#ifdef __linux__
|
||||
#include <linux/zaptel.h>
|
||||
#else
|
||||
#include <zaptel.h>
|
||||
#endif /* __linux__ */
|
||||
#endif
|
||||
|
||||
#include "asterisk/lock.h"
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>netsnmp</depend>
|
||||
<defaultenabled>no</defaultenabled>
|
||||
***/
|
||||
|
||||
#include "asterisk.h"
|
||||
|
|
|
@ -127,7 +127,7 @@ static void *newpvt(struct ast_translator *t)
|
|||
if (t->buf_size) /* finally buffer and header */
|
||||
pvt->outbuf = ofs + AST_FRIENDLY_OFFSET;
|
||||
/* call local init routine, if present */
|
||||
if (t->newpvt && t->newpvt(pvt) == NULL) {
|
||||
if (t->newpvt && t->newpvt(pvt)) {
|
||||
free(pvt);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Reference in New Issue