[asterisk-commits] trunk r35832 - in /trunk: ./ apps/ build_tools/ cdr/ channels/ codecs/ format...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Jun 24 12:43:32 MST 2006


Author: kpfleming
Date: Sat Jun 24 14:43:31 2006
New Revision: 35832

URL: http://svn.digium.com/view/asterisk?rev=35832&view=rev
Log:
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)

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

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Sat Jun 24 14:43:31 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
@@ -885,5 +885,6 @@
 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)

Modified: trunk/apps/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/apps/Makefile?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/apps/Makefile (original)
+++ trunk/apps/Makefile Sat Jun 24 14:43:31 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,48 +15,13 @@
 
 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

Modified: trunk/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_flash.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/apps/app_flash.c (original)
+++ trunk/apps/app_flash.c Sat Jun 24 14:43:31 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: trunk/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_meetme.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Sat Jun 24 14:43:31 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: trunk/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_rpt.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/apps/app_rpt.c (original)
+++ trunk/apps/app_rpt.c Sat Jun 24 14:43:31 2006
@@ -222,8 +222,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: trunk/apps/app_zapbarge.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_zapbarge.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/apps/app_zapbarge.c (original)
+++ trunk/apps/app_zapbarge.c Sat Jun 24 14:43:31 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: trunk/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_zapras.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/apps/app_zapras.c (original)
+++ trunk/apps/app_zapras.c Sat Jun 24 14:43:31 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: trunk/apps/app_zapscan.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_zapscan.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/apps/app_zapscan.c (original)
+++ trunk/apps/app_zapscan.c Sat Jun 24 14:43:31 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: trunk/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/menuselect-deps.in?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/build_tools/menuselect-deps.in (original)
+++ trunk/build_tools/menuselect-deps.in Sat Jun 24 14:43:31 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@

Modified: trunk/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/cdr/Makefile?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/cdr/Makefile (original)
+++ trunk/cdr/Makefile Sat Jun 24 14:43:31 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,60 +27,6 @@
   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

Modified: trunk/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/channel.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/channel.c (original)
+++ trunk/channel.c Sat Jun 24 14:43:31 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: trunk/channels/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/channels/Makefile?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/channels/Makefile (original)
+++ trunk/channels/Makefile Sat Jun 24 14:43:31 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,23 +55,14 @@
   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
@@ -94,11 +72,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
@@ -107,43 +82,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) $(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
 
 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
@@ -156,24 +104,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: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Sat Jun 24 14:43:31 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: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Sat Jun 24 14:43:31 2006
@@ -40,6 +40,7 @@
 /*** MODULEINFO
 	<depend>zaptel</depend>
 	<depend>tonezone</depend>
+	<use>libpri</use>
  ***/
 
 #include "asterisk.h"
@@ -61,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: trunk/codecs/codec_g726.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_g726.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/codecs/codec_g726.c (original)
+++ trunk/codecs/codec_g726.c Sat Jun 24 14:43:31 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: trunk/codecs/codec_gsm.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_gsm.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/codecs/codec_gsm.c (original)
+++ trunk/codecs/codec_gsm.c Sat Jun 24 14:43:31 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: trunk/codecs/codec_ilbc.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_ilbc.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/codecs/codec_ilbc.c (original)
+++ trunk/codecs/codec_ilbc.c Sat Jun 24 14:43:31 2006
@@ -67,20 +67,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: trunk/codecs/codec_lpc10.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_lpc10.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/codecs/codec_lpc10.c (original)
+++ trunk/codecs/codec_lpc10.c Sat Jun 24 14:43:31 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: trunk/codecs/codec_speex.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_speex.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/codecs/codec_speex.c (original)
+++ trunk/codecs/codec_speex.c Sat Jun 24 14:43:31 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: trunk/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_zap.c?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/codecs/codec_zap.c (original)
+++ trunk/codecs/codec_zap.c Sat Jun 24 14:43:31 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: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?rev=35832&r1=35831&r2=35832&view=diff
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Sat Jun 24 14:43:31 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 35607 .
+# 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,52 +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
-EDITLINE_LIBS
-OSS_LIB
-OSS_INCLUDE
-PBX_LIBOSS
-TONEZONE_LIB
-TONEZONE_INCLUDE
-PBX_LIBTONEZONE
 ZAPTEL_INCLUDE
 PBX_ZAPTEL
-gsm_LIB
-gsm_INCLUDE
-PBX_LIBgsm
-PG_CONFIG
-pq_INCLUDE
-pq_LIB
-PBX_LIBpq
-NET_SNMP_CONFIG
-NETSNMP_LIBS
-PBX_NETSNMP
+EDITLINE_LIBS
 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
@@ -1392,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
@@ -1409,17 +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 tonezone files in PATH
   --with-zaptel=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
 
 Some influential environment variables:
   CC          C compiler command
@@ -5545,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
@@ -6931,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"
+     ;;
+     *)
+     KDE_DIR="${withval}"
+     KDE_MANDATORY="yes"
+     ;;
+esac
+
+fi
+
+
+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"
+
+cat >conftest.$ac_ext <<_ACEOF
+
+		/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "kcrash.h"
+int
+main ()
+{
+KCrash::defaultCrashHandler(1);
+  ;
+  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_cxx_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_kde_crash="yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_kde_crash="no"
+fi
+
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+	LDFLAGS="${saved_ldflags}"
+
+	if test "${ac_cv_lib_kde_crash}" = "yes"; then
+		{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	else
+		{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+	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"
+
+		fi
+
+		PBX_KDE=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBKDE 1
+_ACEOF
+
+   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
+
+
+if test x"${PBX_KDE}" = x1; then
+	if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}kdeinit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}kdeinit; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_KDEINIT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $KDEINIT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_KDEINIT="$KDEINIT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_KDEINIT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+KDEINIT=$ac_cv_path_KDEINIT
+if test -n "$KDEINIT"; then
+  { echo "$as_me:$LINENO: result: $KDEINIT" >&5
+echo "${ECHO_T}$KDEINIT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_KDEINIT"; then
+  ac_pt_KDEINIT=$KDEINIT
+  # Extract the first word of "kdeinit", so it can be a program name with args.
+set dummy kdeinit; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_ac_pt_KDEINIT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ac_pt_KDEINIT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_KDEINIT="$ac_pt_KDEINIT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_KDEINIT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_KDEINIT=$ac_cv_path_ac_pt_KDEINIT
+if test -n "$ac_pt_KDEINIT"; then
+  { echo "$as_me:$LINENO: result: $ac_pt_KDEINIT" >&5
+echo "${ECHO_T}$ac_pt_KDEINIT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_pt_KDEINIT" = x; then
+    KDEINIT="No"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    KDEINIT=$ac_pt_KDEINIT
+  fi
+else
+  KDEINIT="$ac_cv_path_KDEINIT"
+fi
+
+	if test ! x"${KDEINIT}" = xNo; then
+   	KDEDIR=$(${DIRNAME} ${KDEINIT})
+   	KDEDIR=$(${DIRNAME} ${KDEDIR})
+	fi
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

[... 7803 lines stripped ...]


More information about the asterisk-commits mailing list