[asterisk-commits] branch group/new_loader_completion r35853 - in /team/group/new_loader_complet...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Jun 24 16:13:12 MST 2006


Author: kpfleming
Date: Sat Jun 24 18:13:12 2006
New Revision: 35853

URL: http://svn.digium.com/view/asterisk?rev=35853&view=rev
Log:
partial update

Modified:
    team/group/new_loader_completion/   (props changed)
    team/group/new_loader_completion/Makefile
    team/group/new_loader_completion/apps/Makefile
    team/group/new_loader_completion/apps/app_flash.c
    team/group/new_loader_completion/apps/app_meetme.c
    team/group/new_loader_completion/apps/app_rpt.c
    team/group/new_loader_completion/apps/app_zapbarge.c
    team/group/new_loader_completion/apps/app_zapras.c
    team/group/new_loader_completion/apps/app_zapscan.c
    team/group/new_loader_completion/build_tools/menuselect-deps.in
    team/group/new_loader_completion/build_tools/prep_moduledeps
    team/group/new_loader_completion/cdr/Makefile
    team/group/new_loader_completion/channel.c
    team/group/new_loader_completion/channels/Makefile
    team/group/new_loader_completion/channels/chan_iax2.c
    team/group/new_loader_completion/channels/chan_zap.c
    team/group/new_loader_completion/codecs/Makefile
    team/group/new_loader_completion/codecs/codec_g726.c
    team/group/new_loader_completion/codecs/codec_gsm.c
    team/group/new_loader_completion/codecs/codec_ilbc.c
    team/group/new_loader_completion/codecs/codec_lpc10.c
    team/group/new_loader_completion/codecs/codec_speex.c
    team/group/new_loader_completion/codecs/codec_zap.c
    team/group/new_loader_completion/configure
    team/group/new_loader_completion/configure.ac
    team/group/new_loader_completion/formats/Makefile
    team/group/new_loader_completion/formats/format_ogg_vorbis.c
    team/group/new_loader_completion/funcs/Makefile
    team/group/new_loader_completion/include/asterisk/autoconfig.h.in
    team/group/new_loader_completion/include/asterisk/translate.h
    team/group/new_loader_completion/makeopts.in
    team/group/new_loader_completion/pbx/Makefile
    team/group/new_loader_completion/res/Makefile
    team/group/new_loader_completion/res/res_musiconhold.c
    team/group/new_loader_completion/translate.c
    team/group/new_loader_completion/udptl.c

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Jun 24 18:13:12 2006
@@ -1,1 +1,1 @@
-/trunk:1-35766
+/trunk:1-35851

Modified: team/group/new_loader_completion/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/Makefile?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/Makefile (original)
+++ team/group/new_loader_completion/Makefile Sat Jun 24 18:13:12 2006
@@ -228,9 +228,6 @@
   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 @@
 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 @@
 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)
@@ -473,6 +470,9 @@
 		mv $@.tmp $@ ; \
 	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
@@ -504,12 +504,13 @@
 	@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
 	@$(MAKE) -C db1-ast clean
 	@$(MAKE) -C stdtime clean
+	@$(MAKE) -C menuselect clean
 
 distclean: dist-clean
 
 dist-clean: clean
 	@$(MAKE) -C mxml clean
-	@$(MAKE) -C build_tools dist-clean
+	@$(MAKE) -C menuselect dist-clean
 	@$(MAKE) -C sounds dist-clean
 	rm -f menuselect.makeopts makeopts makeopts.xml
 	rm -f config.log config.status
@@ -874,7 +875,7 @@
 menuselect: menuselect/menuselect makeopts.xml
 	- at menuselect/menuselect ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
 
-menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect.h config.status mxml/libmxml.a $(MENUSELECT_OBJS)
+menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect.h menuselect/linkedlists.h config.status mxml/libmxml.a $(MENUSELECT_OBJS)
 	@CFLAGS="-include ../include/asterisk/autoconfig.h" $(MAKE) -C menuselect menuselect
 
 mxml/libmxml.a:
@@ -884,5 +885,6 @@
 makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(dir)/*.c) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml
 	@echo "Generating list of available modules ..."
 	@build_tools/prep_moduledeps > $@
-
-.PHONY: 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)
+	@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)

Modified: team/group/new_loader_completion/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/Makefile?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/Makefile (original)
+++ team/group/new_loader_completion/apps/Makefile Sat Jun 24 18:13:12 2006
@@ -5,13 +5,9 @@
 #
 # Copyright (C) 1999-2006, Digium, Inc.
 #
-# Mark Spencer <markster at 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
@@ -19,47 +15,15 @@
 
 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)
 
-$(foreach mod,$(patsubst %.so,%,$(MODS)),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(patsubst %.o,%,$@)\"
+all: _all
 
-app_voicemail.o: CFLAGS+=$(patsubst %,-D%,$(MENUSELECT_app_voicemail))
+$(foreach mod,$(SELECTED_MODS),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(@:%.o=%)\"
 
-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 $@ $^ $(ZAPTEL_LIB)
-
-app_rpt.o: app_rpt.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

Modified: team/group/new_loader_completion/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_flash.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_flash.c (original)
+++ team/group/new_loader_completion/apps/app_flash.c Sat Jun 24 18:13:12 2006
@@ -38,11 +38,7 @@
 #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"

Modified: team/group/new_loader_completion/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_meetme.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_meetme.c (original)
+++ team/group/new_loader_completion/apps/app_meetme.c Sat Jun 24 18:13:12 2006
@@ -39,11 +39,7 @@
 #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"

Modified: team/group/new_loader_completion/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_rpt.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_rpt.c (original)
+++ team/group/new_loader_completion/apps/app_rpt.c Sat Jun 24 18:13:12 2006
@@ -117,6 +117,7 @@
 
 /*** MODULEINFO
 	<depend>zaptel</depend>
+	<depend>tonezone</depend>
 	<defaultenabled>no</defaultenabled>
  ***/
 
@@ -220,8 +221,8 @@
 #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>
 

Modified: team/group/new_loader_completion/apps/app_zapbarge.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_zapbarge.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_zapbarge.c (original)
+++ team/group/new_loader_completion/apps/app_zapbarge.c Sat Jun 24 18:13:12 2006
@@ -45,12 +45,7 @@
 #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"

Modified: team/group/new_loader_completion/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_zapras.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_zapras.c (original)
+++ team/group/new_loader_completion/apps/app_zapras.c Sat Jun 24 18:13:12 2006
@@ -48,13 +48,7 @@
 #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"

Modified: team/group/new_loader_completion/apps/app_zapscan.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_zapscan.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_zapscan.c (original)
+++ team/group/new_loader_completion/apps/app_zapscan.c Sat Jun 24 18:13:12 2006
@@ -44,12 +44,7 @@
 #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"

Modified: team/group/new_loader_completion/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/build_tools/menuselect-deps.in?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/build_tools/menuselect-deps.in (original)
+++ team/group/new_loader_completion/build_tools/menuselect-deps.in Sat Jun 24 18:13:12 2006
@@ -11,7 +11,7 @@
 LIBSPEEX=@PBX_LIBSPEEX@
 LIBVORBIS=@PBX_LIBVORBIS@
 NBS=@PBX_LIBNBS@
-OGG=@PBX_LIBOGG@
+LIBOGG=@PBX_LIBOGG@
 OSSAUDIO=@PBX_LIBOSS@
 PGSQL=@PBX_LIBpq@
 QT=@PBX_QT@
@@ -22,7 +22,8 @@
 VPBAPI=@PBX_LIBvpb@
 WIN32=@OSISWIN32@
 ZLIB=@PBX_LIBZLIB@
-ZAPTEL=@PBX_LIBZAPTEL@
+TONEZONE=@PBX_LIBTONEZONE@
+ZAPTEL=@PBX_ZAPTEL@
 LIBGSM=@PBX_LIBgsm@
 IKSEMEL=@PBX_LIBIKSEMEL@
 IXJUSER=@PBX_IXJUSER@

Modified: team/group/new_loader_completion/build_tools/prep_moduledeps
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/build_tools/prep_moduledeps?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/build_tools/prep_moduledeps (original)
+++ team/group/new_loader_completion/build_tools/prep_moduledeps Sat Jun 24 18:13:12 2006
@@ -42,7 +42,7 @@
 
 echo "<?xml version="1.0"?>"
 echo
-echo "<menu>"
+echo "<menu name=\"Asterisk Module Selection\">"
 rm -f .makeoptstmp
 process_dir apps app APPS Applications
 process_dir cdr cdr CDR "Call Detail Recording"

Modified: team/group/new_loader_completion/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/cdr/Makefile?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/cdr/Makefile (original)
+++ team/group/new_loader_completion/cdr/Makefile Sat Jun 24 18:13:12 2006
@@ -5,13 +5,9 @@
 #
 # Copyright (C) 1999-2006, Digium, Inc.
 #
-# Mark Spencer <markster at 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
@@ -19,17 +15,7 @@
 
 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,62 +27,8 @@
   endif
 endif
 
-MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
+all: _all
 
-$(foreach mod,$(patsubst %.so,%,$(MODS)),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(patsubst %.o,%,$@)\"
+$(foreach mod,$(SELECTED_MODS),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(@:%.o=%)\"
 
-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

Modified: team/group/new_loader_completion/channel.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channel.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/channel.c (original)
+++ team/group/new_loader_completion/channel.c Sat Jun 24 18:13:12 2006
@@ -38,14 +38,7 @@
 
 #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"

Modified: team/group/new_loader_completion/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channels/Makefile?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/channels/Makefile (original)
+++ team/group/new_loader_completion/channels/Makefile Sat Jun 24 18:13:12 2006
@@ -5,13 +5,9 @@
 #
 # Copyright (C) 1999-2006, Digium, Inc.
 #
-# Mark Spencer <markster at 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
@@ -30,11 +26,6 @@
   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
@@ -44,10 +35,6 @@
 ifeq ($(OSARCH),NetBSD)
   PTLIB=-lpt_NetBSD_x86_r
   H323LIB=-lh323_NetBSD_x86_r
-endif
-
-ifeq ($(OSARCH),SunOS)
-  SOLINK+=-lrt
 endif
 
 ifeq ($(wildcard h323/libchanh323.a),)
@@ -68,25 +55,16 @@
   PWLIBDIR=$(HOME)/pwlib
 endif
 
-MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
+MENUSELECT_OPTS_chan_misdn+=CHAN_MISDN_VERSION=\"0.3.0\"
 
-$(foreach mod,$(patsubst %.so,%,$(MODS)),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(patsubst %.o,%,$@)\"
+all: _all
 
-all: $(MODS) 
+$(foreach mod,$(SELECTED_MODS),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(@:%.o=%)\"
 
-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
@@ -96,11 +74,8 @@
   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
@@ -109,43 +84,16 @@
 	./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) $(ZAPTEL_LIB)
-
-chan_zap.o: chan_zap.c
-	$(CC) -c -o $@ $(CFLAGS) $(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.so: chan_vpb.o
 	$(CXX) $(SOLINK) -o $@ $^ $(VPB_LIB)
-
-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_module_interface.so h323/libchanh323.a h323/Makefile.ast
@@ -158,24 +106,5 @@
 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

Modified: team/group/new_loader_completion/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channels/chan_iax2.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/channels/chan_iax2.c (original)
+++ team/group/new_loader_completion/channels/chan_iax2.c Sat Jun 24 18:13:12 2006
@@ -27,6 +27,10 @@
  *
  * \ingroup channel_drivers
  */
+
+/*** MODULEINFO
+	<use>zaptel</use>
+ ***/
 
 #include "asterisk.h"
 
@@ -56,11 +60,7 @@
 
 #ifdef HAVE_ZAPTEL
 #include <sys/ioctl.h>
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
 #include <zaptel.h>
-#endif /* __linux__ */
 #endif
 
 #include "asterisk/lock.h"

Modified: team/group/new_loader_completion/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channels/chan_zap.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/channels/chan_zap.c (original)
+++ team/group/new_loader_completion/channels/chan_zap.c Sat Jun 24 18:13:12 2006
@@ -39,6 +39,8 @@
 
 /*** MODULEINFO
 	<depend>zaptel</depend>
+	<depend>tonezone</depend>
+	<use>libpri</use>
  ***/
 
 #include "asterisk.h"
@@ -60,20 +62,13 @@
 #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"

Modified: team/group/new_loader_completion/codecs/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/codecs/Makefile?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/codecs/Makefile (original)
+++ team/group/new_loader_completion/codecs/Makefile Sat Jun 24 18:13:12 2006
@@ -29,9 +29,9 @@
 
 MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
 
+all: $(MODS)
+
 $(foreach mod,$(patsubst %.so,%,$(MODS)),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(patsubst %.o,%,$@)\"
-
-all: $(MODS)
 
 clean-depend:
 	rm -f .depend
@@ -94,6 +94,9 @@
 codec_lpc10.so: codec_lpc10.o $(LIBLPC10)
 	$(CC) $(SOLINK) -o $@ $^ -lm
 
+codec_zap.o: codec_zap.c
+	$(CC) -c -o $@ $(CFLAGS) $(ZAPTEL_INCLUDE) $<
+
 %.so : %.o
 	$(CC) $(SOLINK) -o $@ $^
 

Modified: team/group/new_loader_completion/codecs/codec_g726.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/codecs/codec_g726.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/codecs/codec_g726.c (original)
+++ team/group/new_loader_completion/codecs/codec_g726.c Sat Jun 24 18:13:12 2006
@@ -700,12 +700,13 @@
 };
 
 /*! \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. */

Modified: team/group/new_loader_completion/codecs/codec_gsm.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/codecs/codec_gsm.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/codecs/codec_gsm.c (original)
+++ team/group/new_loader_completion/codecs/codec_gsm.c Sat Jun 24 18:13:12 2006
@@ -68,13 +68,11 @@
 	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)

Modified: team/group/new_loader_completion/codecs/codec_ilbc.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/codecs/codec_ilbc.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/codecs/codec_ilbc.c (original)
+++ team/group/new_loader_completion/codecs/codec_ilbc.c Sat Jun 24 18:13:12 2006
@@ -65,20 +65,22 @@
 	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;
-}
-
-static void *ilbctolin_new(struct ast_trans_pvt *pvt)
+
+	return 0;
+}
+
+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)

Modified: team/group/new_loader_completion/codecs/codec_lpc10.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/codecs/codec_lpc10.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/codecs/codec_lpc10.c (original)
+++ team/group/new_loader_completion/codecs/codec_lpc10.c Sat Jun 24 18:13:12 2006
@@ -72,22 +72,18 @@
 	int longer;
 };
 
-static void *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;
-}
-
-static void *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;
+static int lpc10_enc_new(struct ast_trans_pvt *pvt)
+{
+	struct lpc10_coder_pvt *tmp = pvt->pvt;
+
+	return (tmp->lpc10.enc = create_lpc10_encoder_state()) ? 0 : -1;
+}
+
+static int lpc10_dec_new(struct ast_trans_pvt *pvt)
+{
+	struct lpc10_coder_pvt *tmp = pvt->pvt;
+
+	return (tmp->lpc10.dec = create_lpc10_decoder_state()) ? 0 : -1;
 }
 
 static struct ast_frame *lintolpc10_sample(void)

Modified: team/group/new_loader_completion/codecs/codec_speex.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/codecs/codec_speex.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/codecs/codec_speex.c (original)
+++ team/group/new_loader_completion/codecs/codec_speex.c Sat Jun 24 18:13:12 2006
@@ -103,17 +103,16 @@
 };
 
 
-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 @@
 		speex_encoder_ctl(tmp->speex, SPEEX_SET_DTX, &dtx); 
 	tmp->silent_state = 0;
 
-	return tmp;
-}
-
-static void *speextolin_new(struct ast_trans_pvt *pvt)
+	return 0;
+}
+
+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)

Modified: team/group/new_loader_completion/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/codecs/codec_zap.c?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/codecs/codec_zap.c (original)
+++ team/group/new_loader_completion/codecs/codec_zap.c Sat Jun 24 18:13:12 2006
@@ -43,7 +43,7 @@
 #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 @@
 	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 @@
 	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 @@
 		munmap(hdr, sizeof(*hdr));
 		close(fd);
 
-		return NULL;
+		return -1;
 	}
 	
 	hdr->srcfmt = (1 << source);
@@ -195,17 +195,17 @@
 		munmap(hdr, sizeof(*hdr));
 		close(fd);
 
-		return NULL;
+		return -1;
 	}
 
 	ztp = pvt->pvt;
 	ztp->fd = fd;
 	ztp->hdr = hdr;
 
-	return pvt;
-}
-
-static void *zap_new(struct ast_trans_pvt *pvt)
+	return 0;
+}
+
+static int zap_new(struct ast_trans_pvt *pvt)
 {
 	return zap_translate(pvt, pvt->t->dstfmt, pvt->t->srcfmt);
 }

Modified: team/group/new_loader_completion/configure
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/configure?rev=35853&r1=35852&r2=35853&view=diff
==============================================================================
--- team/group/new_loader_completion/configure (original)
+++ team/group/new_loader_completion/configure Sat Jun 24 18:13:12 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 35439 .
+# From configure.ac Revision: 35812 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59e.
 #
@@ -697,6 +697,14 @@
 CURSES_LIB
 CURSES_INCLUDE
 PBX_LIBCURSES
+gsm_LIB
+gsm_INCLUDE
+PBX_LIBgsm
+KDE_INCLUDE
+KDE_LIBS
+PBX_KDE
+KDEINIT
+KDEDIR
 IKSEMEL_LIB
 IKSEMEL_INCLUDE
 PBX_LIBIKSEMEL
@@ -706,6 +714,9 @@
 NCURSES_LIB
 NCURSES_INCLUDE
 PBX_LIBNCURSES
+NETSNMP_CONFIG
+NETSNMP_LIB
+PBX_NETSNMP
 NEWT_LIB
 NEWT_INCLUDE
 PBX_LIBNEWT
@@ -718,12 +729,26 @@
 OSPTK_LIB
 OSPTK_INCLUDE
 PBX_LIBOSPTK
+OSS_LIB
+OSS_INCLUDE
+PBX_LIBOSS
+PG_CONFIG
+pq_INCLUDE
+pq_LIB
+PBX_LIBpq
 POPT_LIB
 POPT_INCLUDE
 PBX_LIBPOPT
 LIBPRI_LIB
 LIBPRI_INCLUDE
 PBX_LIBLIBPRI
+PWLIB_INCLUDE
+PWLIB_LIB
+PBX_LIBPWLIB
+QT_INCLUDE
+QT_LIB
+QTMOC
+PBX_QT
 RADIUSCLIENT_LIB
 RADIUSCLIENT_INCLUDE
 PBX_LIBRADIUSCLIENT
@@ -745,50 +770,27 @@
 TINFO_LIB
 TINFO_INCLUDE
 PBX_LIBTINFO
+TONEZONE_LIB
+TONEZONE_INCLUDE
+PBX_LIBTONEZONE
 VORBIS_LIB
 VORBIS_INCLUDE
 PBX_LIBVORBIS
+VPB_INCLUDE
+VPB_LIB
+PBX_LIBvpb
 ZLIB_LIB
 ZLIB_INCLUDE
 PBX_LIBZLIB
+ZAPTEL_INCLUDE
+PBX_ZAPTEL
 EDITLINE_LIBS
-OSS_LIB
-OSS_INCLUDE
-PBX_LIBOSS
-ZAPTEL_LIB
-ZAPTEL_INCLUDE
-PBX_LIBZAPTEL
-gsm_LIB
-gsm_INCLUDE
-PBX_LIBgsm
-PG_CONFIG
-pq_INCLUDE
-pq_LIB
-PBX_LIBpq
-NET_SNMP_CONFIG
-NETSNMP_LIBS
-PBX_NETSNMP
 PBX_H323
 PBX_IXJUSER
-VPB_INCLUDE
-VPB_LIB
-PBX_LIBvpb
-QT_INCLUDE
-QT_LIB
-QTMOC
-PBX_QT
-KDE_INCLUDE
-KDE_LIBS
-PBX_KDE
-KDEINIT
-KDEDIR
 GTKCONFIG
 PBX_GTK
 GTK_INCLUDE
 GTK_LIBS
-PWLIB_INCLUDE
-PWLIB_LIB
-PBX_LIBPWLIB
 CURL
 PBX_CURL
 CURLLIBS
@@ -1390,15 +1392,22 @@
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-asound=PATH      use Advanced Linux Sound Architecture files in PATH
   --with-curses=PATH      use curses files in PATH
+  --with-gsm=PATH         use libgsm files in PATH, or 'internal'
+  --with-kde=PATH         use KDE files in PATH
   --with-iksemel=PATH     use Iksemel Jabber Library files in PATH
   --with-nbs=PATH         use Network Broadcast Sound files in PATH
   --with-ncurses=PATH     use ncurses files in PATH
+  --with-netsnmp=PATH     use Net-SNMP in PATH
   --with-newt=PATH        use newt files in PATH
   --with-odbc=PATH        use unixODBC files in PATH
   --with-ogg=PATH         use OGG files in PATH
   --with-osptk=PATH       use OSP Toolkit files in PATH
+  --with-ossaudio=PATH    use Open Sound System files in PATH
+  --with-pq=PATH          use PostgreSQL files in PATH
   --with-popt=PATH        use popt files in PATH
   --with-pri=PATH         use ISDN PRI files in PATH
+  --with-pwlib=PATH       use PWLib files in PATH
+  --with-qt=PATH          use Qt files in PATH
   --with-radiusclient-ng=PATH
                           use Radius Client files in PATH
   --with-speex=PATH       use Speex files in PATH
@@ -1407,16 +1416,11 @@
   --with-tds=PATH         use FreeTDS files in PATH
   --with-termcap=PATH     use Termcap files in PATH
   --with-tinfo=PATH       use Term Info files in PATH
+  --with-tonezone=PATH    use tonezone files in PATH
   --with-vorbis=PATH      use Vorbis files in PATH
+  --with-vpb=PATH         use vpb files in PATH
   --with-z=PATH           use zlib files in PATH
-  --with-ossaudio=PATH    use Open Sound System files in PATH
-  --with-tonezone=PATH    use Zaptel files in PATH
-  --with-gsm=PATH         use libgsm files in PATH, or 'internal'
-  --with-pq=PATH          use PostgreSQL files in PATH
-  --with-vpb=PATH         use vpb files in PATH
-  --with-qt=PATH          use Qt files in PATH
-  --with-kde=PATH         use KDE files in PATH
-  --with-pwlib=PATH       use PWLib files in PATH
+  --with-zaptel=PATH      use Zaptel files in PATH
 
 Some influential environment variables:
   CC          C compiler command
@@ -5542,6 +5546,9 @@
 
 
 
+# from here on down, library checking should be done in alphabetical order
+# by the --with option name, to make things easier for the users :-)
+
 
 
 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
@@ -6928,6 +6935,398 @@
 
 
 
+GSM_INTERNAL="yes"
+GSM_SYSTEM="yes"
+
+# Check whether --with-gsm was given.
+if test "${with_gsm+set}" = set; then
+  withval=$with_gsm;
+case ${withval} in
+     n|no)
+     USE_GSM=no
+     ;;
+     y|ye|yes)
+     ;;
+     internal)
+     GSM_SYSTEM="no"
+     ;;
+     *)
+     GSM_DIR="${withval}"
+     GSM_INTERNAL="no"
+     ;;
+esac
+
+fi
+
+
+PBX_LIBgsm=0
+
+if test "${USE_GSM}" != "no"; then
+   if test "${GSM_SYSTEM}" = "yes"; then
+      gsmlibdir=""
+      if test "x${GSM_DIR}" != "x"; then
+         gsmlibdir="-L${GSM_DIR}/lib"
+      fi
+      { echo "$as_me:$LINENO: checking for gsm_create in -lgsm" >&5
+echo $ECHO_N "checking for gsm_create in -lgsm... $ECHO_C" >&6; }
+if test "${ac_cv_lib_gsm_gsm_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgsm ${gsmlibdir} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gsm_create ();
+int
+main ()
+{
+return gsm_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_gsm_gsm_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_gsm_gsm_create=no
+fi
+
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_gsm_gsm_create" >&5
+echo "${ECHO_T}$ac_cv_lib_gsm_gsm_create" >&6; }
+if test $ac_cv_lib_gsm_gsm_create = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GSM 1
+_ACEOF
+
+fi
+
+      if test "${ac_cv_lib_gsm_gsm_create}" = "yes"; then
+	 gsm_LIB="-lgsm"
+	 if test "x${GSM_DIR}" != "x"; then
+	    gsm_LIB="${gsmlibdir} ${gsm_LIB}"
+	    gsm_INCLUDE="-I${GSM_DIR}/include"
+	 fi
+	 PBX_LIBgsm=1
+	 GSM_INTERNAL="no"
+      fi
+   fi
+   if test "${GSM_INTERNAL}" = "yes"; then
+      gsm_LIB="internal"
+      PBX_LIBgsm=1
+   fi
+   if test "x${PBX_LIBgsm}" = "x0"; then
+      echo "***"
+      echo "*** The GSM installation on this system appears to be broken."
+      echo "*** Either correct the installation, or run configure"
+      echo "*** including --without-gsm"
+      exit 1
+   fi
+fi
+
+
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+# Check whether --with-kde was given.
+if test "${with_kde+set}" = set; then
+  withval=$with_kde;
+case ${withval} in
+     n|no)
+     USE_KDE=no
+     ;;
+     y|ye|yes)
+     KDE_MANDATORY="yes"
+     ;;

[... 8169 lines stripped ...]


More information about the asterisk-commits mailing list