From e61d3d91f37f8b5b2fbcd30c2d3d0ba3abd5478f Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Sat, 24 Jun 2006 19:43:31 +0000 Subject: [PATCH] The Eurostar Commit! (it's amazing how much work you can get done on a 150 minute train ride from Paris to London ) 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- 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: https://origsvn.digium.com/svn/asterisk/trunk@35832 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- Makefile | 15 +- apps/Makefile | 45 +- apps/app_flash.c | 4 - apps/app_meetme.c | 4 - apps/app_rpt.c | 2 +- apps/app_zapbarge.c | 5 - apps/app_zapras.c | 6 - apps/app_zapscan.c | 5 - build_tools/menuselect-deps.in | 2 +- cdr/Makefile | 74 +- channel.c | 7 - channels/Makefile | 91 +- channels/chan_iax2.c | 8 +- channels/chan_zap.c | 8 +- codecs/codec_g726.c | 5 +- codecs/codec_gsm.c | 6 +- codecs/codec_ilbc.c | 10 +- codecs/codec_lpc10.c | 12 +- codecs/codec_speex.c | 15 +- codecs/codec_zap.c | 16 +- configure | 6774 ++++++++++++++++-------------- configure.ac | 628 +-- formats/Makefile | 39 +- formats/format_ogg_vorbis.c | 2 +- funcs/Makefile | 46 +- include/asterisk/autoconfig.h.in | 3 + include/asterisk/translate.h | 2 +- makeopts.in | 52 +- pbx/Makefile | 70 +- res/Makefile | 82 +- res/res_musiconhold.c | 5 +- res/res_snmp.c | 1 - translate.c | 2 +- 33 files changed, 3988 insertions(+), 4058 deletions(-) diff --git a/Makefile b/Makefile index 7c693ff043..7af2cca9bc 100644 --- a/Makefile +++ b/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) diff --git a/apps/Makefile b/apps/Makefile index a48477abe2..01d70c6af3 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -5,62 +5,23 @@ # # Copyright (C) 1999-2006, Digium, Inc. # -# Mark Spencer -# # 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 diff --git a/apps/app_flash.c b/apps/app_flash.c index f1e652a6ab..a49505210e 100644 --- a/apps/app_flash.c +++ b/apps/app_flash.c @@ -38,11 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include -#ifdef __linux__ -#include -#else #include -#endif /* __linux__ */ #include "asterisk/lock.h" #include "asterisk/file.h" diff --git a/apps/app_meetme.c b/apps/app_meetme.c index f19ecccf8b..16cf7f1a85 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -39,11 +39,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include -#ifdef __linux__ -#include -#else #include -#endif /* __linux__ */ #include "asterisk/lock.h" #include "asterisk/file.h" diff --git a/apps/app_rpt.c b/apps/app_rpt.c index c18fc20715..506683b31d 100644 --- a/apps/app_rpt.c +++ b/apps/app_rpt.c @@ -222,8 +222,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include +#include #include -#include #include #include diff --git a/apps/app_zapbarge.c b/apps/app_zapbarge.c index 943d41bb73..2381509bb2 100644 --- a/apps/app_zapbarge.c +++ b/apps/app_zapbarge.c @@ -45,12 +45,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include - -#ifdef __linux__ -#include -#else #include -#endif /* __linux__ */ #include "asterisk/lock.h" #include "asterisk/file.h" diff --git a/apps/app_zapras.c b/apps/app_zapras.c index 95e69ac66f..8511c4ea5d 100644 --- a/apps/app_zapras.c +++ b/apps/app_zapras.c @@ -48,13 +48,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include - -/* Need some zaptel help here */ -#ifdef __linux__ -#include -#else #include -#endif /* __linux__ */ #include "asterisk/lock.h" #include "asterisk/file.h" diff --git a/apps/app_zapscan.c b/apps/app_zapscan.c index b4257d8edc..7697f11b1c 100644 --- a/apps/app_zapscan.c +++ b/apps/app_zapscan.c @@ -44,12 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include - -#ifdef __linux__ -#include -#else #include -#endif /* __linux__ */ #include "asterisk/lock.h" #include "asterisk/file.h" diff --git a/build_tools/menuselect-deps.in b/build_tools/menuselect-deps.in index 968e16dc39..aa4e15c9f1 100644 --- a/build_tools/menuselect-deps.in +++ b/build_tools/menuselect-deps.in @@ -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@ diff --git a/cdr/Makefile b/cdr/Makefile index cfc6fbfa5b..5b1f5071b4 100644 --- a/cdr/Makefile +++ b/cdr/Makefile @@ -5,31 +5,17 @@ # # Copyright (C) 1999-2006, Digium, Inc. # -# Mark Spencer -# # 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 diff --git a/channel.c b/channel.c index 30a1ad073a..90d8a2e48f 100644 --- a/channel.c +++ b/channel.c @@ -38,14 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #ifdef HAVE_ZAPTEL #include -#ifdef __linux__ -#include -#else #include -#endif /* __linux__ */ -#ifndef ZT_TIMERPING -#error "You need newer zaptel! Please cvs update zaptel" -#endif #endif #include "asterisk/pbx.h" diff --git a/channels/Makefile b/channels/Makefile index c98af29d0d..e65ce12566 100644 --- a/channels/Makefile +++ b/channels/Makefile @@ -5,14 +5,10 @@ # # Copyright (C) 1999-2006, Digium, Inc. # -# Mark Spencer -# # 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 diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index ab48d9a01d..7eb42457e0 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -28,6 +28,10 @@ * \ingroup channel_drivers */ +/*** MODULEINFO + zaptel + ***/ + #include "asterisk.h" ASTERISK_FILE_VERSION(__FILE__, "$Revision$") @@ -56,11 +60,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #ifdef HAVE_ZAPTEL #include -#ifdef __linux__ -#include -#else #include -#endif /* __linux__ */ #endif #include "asterisk/lock.h" diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 47599e4d97..e2d96b1293 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -40,6 +40,7 @@ /*** MODULEINFO zaptel tonezone + libpri ***/ #include "asterisk.h" @@ -61,20 +62,13 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #endif #include #include -#ifdef __linux__ -#include -#else #include -#endif /* __linux__ */ #include #include #include #ifdef HAVE_LIBPRI #include -#ifndef PRI_KEYPAD_FACILITY_TX -#error "You need newer libpri" -#endif #endif #include "asterisk/lock.h" diff --git a/codecs/codec_g726.c b/codecs/codec_g726.c index f4cfdd7498..1634ae5d22 100644 --- a/codecs/codec_g726.c +++ b/codecs/codec_g726.c @@ -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. */ diff --git a/codecs/codec_gsm.c b/codecs/codec_gsm.c index c7b0b100cd..a23306e574 100644 --- a/codecs/codec_gsm.c +++ b/codecs/codec_gsm.c @@ -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) diff --git a/codecs/codec_ilbc.c b/codecs/codec_ilbc.c index e41e4776fd..883a385c8d 100644 --- a/codecs/codec_ilbc.c +++ b/codecs/codec_ilbc.c @@ -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) diff --git a/codecs/codec_lpc10.c b/codecs/codec_lpc10.c index 8f1c81a432..e41137de1b 100644 --- a/codecs/codec_lpc10.c +++ b/codecs/codec_lpc10.c @@ -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) diff --git a/codecs/codec_speex.c b/codecs/codec_speex.c index 81808f9fd9..ebc1ed5664 100644 --- a/codecs/codec_speex.c +++ b/codecs/codec_speex.c @@ -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) diff --git a/codecs/codec_zap.c b/codecs/codec_zap.c index cad97c4751..e7ece201d0 100644 --- a/codecs/codec_zap.c +++ b/codecs/codec_zap.c @@ -43,7 +43,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include -#include +#include #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); } diff --git a/configure b/configure index 9e5d49674e..ddccf78822 100755 --- a/configure +++ b/configure @@ -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 @@ PBX_LIBALSA 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 @@ PBX_LIBNBS NCURSES_LIB NCURSES_INCLUDE PBX_LIBNCURSES +NETSNMP_CONFIG +NETSNMP_LIB +PBX_NETSNMP NEWT_LIB NEWT_INCLUDE PBX_LIBNEWT @@ -718,12 +729,26 @@ PBX_LIBOGG 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 @@ PBX_LIBTERMCAP TINFO_LIB TINFO_INCLUDE PBX_LIBTINFO -VORBIS_LIB -VORBIS_INCLUDE -PBX_LIBVORBIS -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 -PBX_H323 -PBX_IXJUSER +VORBIS_LIB +VORBIS_INCLUDE +PBX_LIBVORBIS VPB_INCLUDE VPB_LIB PBX_LIBvpb -QT_INCLUDE -QT_LIB -QTMOC -PBX_QT -KDE_INCLUDE -KDE_LIBS -PBX_KDE -KDEINIT -KDEDIR +ZLIB_LIB +ZLIB_INCLUDE +PBX_LIBZLIB +ZAPTEL_INCLUDE +PBX_ZAPTEL +EDITLINE_LIBS +PBX_H323 +PBX_IXJUSER GTKCONFIG PBX_GTK GTK_INCLUDE GTK_LIBS -PWLIB_INCLUDE -PWLIB_LIB -PBX_LIBPWLIB CURL PBX_CURL CURLLIBS @@ -1392,15 +1392,22 @@ Optional Packages: --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 @@ Optional Packages: --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-vorbis=PATH use Vorbis 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-vorbis=PATH use Vorbis 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-z=PATH use zlib files in PATH + --with-zaptel=PATH use Zaptel files in PATH Some influential environment variables: CC C compiler command @@ -5545,6 +5546,9 @@ fi +# 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 @@ fi +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@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@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' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + # Check whether --with-iksemel was given. if test "${with_iksemel+set}" = set; then @@ -8348,6 +8744,358 @@ fi +# Check whether --with-netsnmp was given. +if test "${with_netsnmp+set}" = set; then + withval=$with_netsnmp; +case ${withval} in + n|no) + USE_NETSNMP=no + ;; + y|ye|yes) + NETSNMP_MANDATORY="yes" + ;; + *) + NETSNMP_DIR="${withval}" + NETSNMP_MANDATORY="yes" + ;; +esac + +fi + + +PBX_NETSNMP=0 +NETSNMP_CONFIG=No +if test "${USE_NETSNMP}" != "no"; then + if test "x${NETSNMP_DIR}" != "x"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}net-snmp-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}net-snmp-config; 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_NETSNMP_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $NETSNMP_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_NETSNMP_CONFIG="$NETSNMP_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in ${NETSNMP_DIR}/bin +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_NETSNMP_CONFIG="$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 +NETSNMP_CONFIG=$ac_cv_path_NETSNMP_CONFIG +if test -n "$NETSNMP_CONFIG"; then + { echo "$as_me:$LINENO: result: $NETSNMP_CONFIG" >&5 +echo "${ECHO_T}$NETSNMP_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_NETSNMP_CONFIG"; then + ac_pt_NETSNMP_CONFIG=$NETSNMP_CONFIG + # Extract the first word of "net-snmp-config", so it can be a program name with args. +set dummy net-snmp-config; 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_NETSNMP_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_NETSNMP_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_NETSNMP_CONFIG="$ac_pt_NETSNMP_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in ${NETSNMP_DIR}/bin +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_NETSNMP_CONFIG="$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_NETSNMP_CONFIG=$ac_cv_path_ac_pt_NETSNMP_CONFIG +if test -n "$ac_pt_NETSNMP_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_NETSNMP_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_NETSNMP_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_NETSNMP_CONFIG" = x; then + NETSNMP_CONFIG="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@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@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + NETSNMP_CONFIG=$ac_pt_NETSNMP_CONFIG + fi +else + NETSNMP_CONFIG="$ac_cv_path_NETSNMP_CONFIG" +fi + + 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 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}net-snmp-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}net-snmp-config; 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_NETSNMP_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $NETSNMP_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_NETSNMP_CONFIG="$NETSNMP_CONFIG" # 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_NETSNMP_CONFIG="$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 +NETSNMP_CONFIG=$ac_cv_path_NETSNMP_CONFIG +if test -n "$NETSNMP_CONFIG"; then + { echo "$as_me:$LINENO: result: $NETSNMP_CONFIG" >&5 +echo "${ECHO_T}$NETSNMP_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_NETSNMP_CONFIG"; then + ac_pt_NETSNMP_CONFIG=$NETSNMP_CONFIG + # Extract the first word of "net-snmp-config", so it can be a program name with args. +set dummy net-snmp-config; 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_NETSNMP_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_NETSNMP_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_NETSNMP_CONFIG="$ac_pt_NETSNMP_CONFIG" # 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_NETSNMP_CONFIG="$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_NETSNMP_CONFIG=$ac_cv_path_ac_pt_NETSNMP_CONFIG +if test -n "$ac_pt_NETSNMP_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_NETSNMP_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_NETSNMP_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_NETSNMP_CONFIG" = x; then + NETSNMP_CONFIG="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@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@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + NETSNMP_CONFIG=$ac_pt_NETSNMP_CONFIG + fi +else + NETSNMP_CONFIG="$ac_cv_path_NETSNMP_CONFIG" +fi + + fi +fi + +if test x"${NETSNMP_CONFIG}" != xNo; then + NETSNMP_libs=`net-snmp-config --agent-libs` + + { echo "$as_me:$LINENO: checking for snmp_register_callback in -lnetsnmp" >&5 +echo $ECHO_N "checking for snmp_register_callback in -lnetsnmp... $ECHO_C" >&6; } +if test "${ac_cv_lib_netsnmp_snmp_register_callback+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnetsnmp ${NETSNMP_libs} $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 snmp_register_callback (); +int +main () +{ +return snmp_register_callback (); + ; + 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_netsnmp_snmp_register_callback=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_netsnmp_snmp_register_callback=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_netsnmp_snmp_register_callback" >&5 +echo "${ECHO_T}$ac_cv_lib_netsnmp_snmp_register_callback" >&6; } +if test $ac_cv_lib_netsnmp_snmp_register_callback = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_NETSNMP 1 +_ACEOF + +fi + + + 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 + + + + + # Check whether --with-newt was given. if test "${with_newt+set}" = set; then withval=$with_newt; @@ -10235,6 +10983,1163 @@ fi +PBX_LIBOSS=0 +if test "${ac_cv_header_linux_soundcard_h+set}" = set; then + { echo "$as_me:$LINENO: checking for linux/soundcard.h" >&5 +echo $ECHO_N "checking for linux/soundcard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_soundcard_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_soundcard_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_soundcard_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking linux/soundcard.h usability" >&5 +echo $ECHO_N "checking linux/soundcard.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +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_compile") 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_objext' + { (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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking linux/soundcard.h presence" >&5 +echo $ECHO_N "checking linux/soundcard.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/soundcard.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/soundcard.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/soundcard.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/soundcard.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: linux/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/soundcard.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/soundcard.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for linux/soundcard.h" >&5 +echo $ECHO_N "checking for linux/soundcard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_soundcard_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_soundcard_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_soundcard_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_soundcard_h" >&6; } + +fi +if test $ac_cv_header_linux_soundcard_h = yes; then + + PBX_LIBOSS=1 + +cat >>confdefs.h <<_ACEOF +#define HAVE_OSS 1 +_ACEOF + + +fi + + +if test "$PBX_LIBOSS" = "0"; then + if test "${ac_cv_header_sys_soundcard_h+set}" = set; then + { echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5 +echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_soundcard_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking sys/soundcard.h usability" >&5 +echo $ECHO_N "checking sys/soundcard.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +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_compile") 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_objext' + { (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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking sys/soundcard.h presence" >&5 +echo $ECHO_N "checking sys/soundcard.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/soundcard.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/soundcard.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5 +echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_soundcard_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_soundcard_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6; } + +fi +if test $ac_cv_header_sys_soundcard_h = yes; then + + PBX_LIBossaudio=1 + +cat >>confdefs.h <<_ACEOF +#define HAVE_OSS 1 +_ACEOF + + +fi + + +fi +if test "$PBX_LIBOSS" = "0"; then + + +# Check whether --with-ossaudio was given. +if test "${with_ossaudio+set}" = set; then + withval=$with_ossaudio; +case ${withval} in + n|no) + USE_OSS=no + ;; + y|ye|yes) + OSS_MANDATORY="yes" + ;; + *) + OSS_DIR="${withval}" + OSS_MANDATORY="yes" + ;; +esac + +fi + + +PBX_LIBOSS=0 + +if test "${USE_OSS}" != "no"; then + pbxlibdir="" + if test "x${OSS_DIR}" != "x"; then + pbxlibdir="-L${ossaudio_DIR}/lib" + fi + { echo "$as_me:$LINENO: checking for oss_ioctl_mixer in -lossaudio" >&5 +echo $ECHO_N "checking for oss_ioctl_mixer in -lossaudio... $ECHO_C" >&6; } +if test "${ac_cv_lib_ossaudio_oss_ioctl_mixer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lossaudio ${pbxlibdir} $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 oss_ioctl_mixer (); +int +main () +{ +return oss_ioctl_mixer (); + ; + 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_ossaudio_oss_ioctl_mixer=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ossaudio_oss_ioctl_mixer=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_ossaudio_oss_ioctl_mixer" >&5 +echo "${ECHO_T}$ac_cv_lib_ossaudio_oss_ioctl_mixer" >&6; } +if test $ac_cv_lib_ossaudio_oss_ioctl_mixer = yes; then + AST_OSS_FOUND=yes +else + AST_OSS_FOUND=no +fi + + + if test "${AST_OSS_FOUND}" = "yes"; then + OSS_LIB="-lossaudio " + OSS_HEADER_FOUND="1" + if test "x${OSS_DIR}" != "x"; then + OSS_LIB="${pbxlibdir} ${OSS_LIB}" + OSS_INCLUDE="-I${OSS_DIR}/include" + if test "xsoundcard.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${OSS_DIR}/include/soundcard.h" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for ${OSS_DIR}/include/soundcard.h" >&5 +echo $ECHO_N "checking for ${OSS_DIR}/include/soundcard.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ${OSS_DIR}/include/soundcard.h usability" >&5 +echo $ECHO_N "checking ${OSS_DIR}/include/soundcard.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <${OSS_DIR}/include/soundcard.h> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +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_compile") 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_objext' + { (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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ${OSS_DIR}/include/soundcard.h presence" >&5 +echo $ECHO_N "checking ${OSS_DIR}/include/soundcard.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <${OSS_DIR}/include/soundcard.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for ${OSS_DIR}/include/soundcard.h" >&5 +echo $ECHO_N "checking for ${OSS_DIR}/include/soundcard.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + OSS_HEADER_FOUND=1 +else + OSS_HEADER_FOUND=0 +fi + + + fi + else + if test "xsoundcard.h" != "x" ; then + if test "${ac_cv_header_soundcard_h+set}" = set; then + { echo "$as_me:$LINENO: checking for soundcard.h" >&5 +echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_soundcard_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_soundcard_h" >&5 +echo "${ECHO_T}$ac_cv_header_soundcard_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking soundcard.h usability" >&5 +echo $ECHO_N "checking soundcard.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +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_compile") 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_objext' + { (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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking soundcard.h presence" >&5 +echo $ECHO_N "checking soundcard.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: soundcard.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: soundcard.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: soundcard.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: soundcard.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: soundcard.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: soundcard.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: soundcard.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for soundcard.h" >&5 +echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_soundcard_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_soundcard_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_soundcard_h" >&5 +echo "${ECHO_T}$ac_cv_header_soundcard_h" >&6; } + +fi +if test $ac_cv_header_soundcard_h = yes; then + OSS_HEADER_FOUND=1 +else + OSS_HEADER_FOUND=0 +fi + + + fi + fi + if test "x${OSS_HEADER_FOUND}" = "x0" ; then + if test ! -z "${OSS_MANDATORY}" ; + then + echo " ***" + echo " *** It appears that you do not have the ossaudio development package installed." + echo " *** Please install it to include Open Sound System support, or re-run configure" + echo " *** without explicitly specifying --with-ossaudio" + exit 1 + fi + OSS_LIB="" + OSS_INCLUDE="" + PBX_LIBOSS=0 + else + PBX_LIBOSS=1 + +cat >>confdefs.h <<_ACEOF +#define HAVE_OSS 1 +_ACEOF + + fi + elif test ! -z "${OSS_MANDATORY}"; + then + echo "***" + echo "*** The Open Sound System installation on this system appears to be broken." + echo "*** Either correct the installation, or run configure" + echo "*** without explicity specifying --with-ossaudio" + exit 1 + fi +fi + + + + +fi + + + + +# Check whether --with-pq was given. +if test "${with_pq+set}" = set; then + withval=$with_pq; +case ${withval} in + n|no) + USE_PQ=no + ;; + y|ye|yes) + PQ_MANDATORY="yes" + ;; + *) + PQ_DIR="${withval}" + PQ_MANDATORY="yes" + ;; +esac + +fi + + +PBX_LIBpq=0 +PG_CONFIG=No +if test "${USE_PQ}" != "no"; then + if test "x${PQ_DIR}" != "x"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pg_config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pg_config; 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_PG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in ${PQ_DIR}/bin +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_PG_CONFIG="$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 +PG_CONFIG=$ac_cv_path_PG_CONFIG +if test -n "$PG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PG_CONFIG" >&5 +echo "${ECHO_T}$PG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PG_CONFIG"; then + ac_pt_PG_CONFIG=$PG_CONFIG + # Extract the first word of "pg_config", so it can be a program name with args. +set dummy pg_config; 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_PG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_PG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PG_CONFIG="$ac_pt_PG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in ${PQ_DIR}/bin +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_PG_CONFIG="$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_PG_CONFIG=$ac_cv_path_ac_pt_PG_CONFIG +if test -n "$ac_pt_PG_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_PG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_PG_CONFIG" = x; then + PG_CONFIG="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@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@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PG_CONFIG=$ac_pt_PG_CONFIG + fi +else + PG_CONFIG="$ac_cv_path_PG_CONFIG" +fi + + if test x"${PG_CONFIG}" = xNo; then + echo "***" + echo "*** pg_config was not found in the path you specified:" + echo "*** ${PQ_DIR}/bin" + echo "*** Either correct the installation, or run configure" + echo "*** including --without-pq" + exit 1 + fi + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pg_config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pg_config; 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_PG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PG_CONFIG="$PG_CONFIG" # 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_PG_CONFIG="$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 +PG_CONFIG=$ac_cv_path_PG_CONFIG +if test -n "$PG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PG_CONFIG" >&5 +echo "${ECHO_T}$PG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PG_CONFIG"; then + ac_pt_PG_CONFIG=$PG_CONFIG + # Extract the first word of "pg_config", so it can be a program name with args. +set dummy pg_config; 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_PG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_PG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PG_CONFIG="$ac_pt_PG_CONFIG" # 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_PG_CONFIG="$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_PG_CONFIG=$ac_cv_path_ac_pt_PG_CONFIG +if test -n "$ac_pt_PG_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_PG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_PG_CONFIG" = x; then + PG_CONFIG="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@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@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PG_CONFIG=$ac_pt_PG_CONFIG + fi +else + PG_CONFIG="$ac_cv_path_PG_CONFIG" +fi + + fi +fi + +if test x"${PG_CONFIG}" != xNo; then + PQ_libdir=`pg_config --libdir` + PQ_includedir=`pg_config --includedir` + + { echo "$as_me:$LINENO: checking for PQexec in -lpq" >&5 +echo $ECHO_N "checking for PQexec in -lpq... $ECHO_C" >&6; } +if test "${ac_cv_lib_pq_PQexec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpq -L${PQ_libdir} -lz $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 PQexec (); +int +main () +{ +return PQexec (); + ; + 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_pq_PQexec=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_pq_PQexec=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_pq_PQexec" >&5 +echo "${ECHO_T}$ac_cv_lib_pq_PQexec" >&6; } +if test $ac_cv_lib_pq_PQexec = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_PQ 1 +_ACEOF + +fi + + + if test "${ac_cv_lib_pq_PQexec}" = "yes"; then + pq_LIB="-L${PQ_libdir} -lpq -lz" + pq_INCLUDE="-I${PQ_includedir}" + PBX_LIBpq=1 + 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 +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 + + + + + # Check whether --with-popt was given. if test "${with_popt+set}" = set; then @@ -11179,6 +13084,447 @@ fi +PLATFORM_PTLIB="ptlib_${OSTYPE}_${MACHTYPE}_r" + + +# Check whether --with-pwlib was given. +if test "${with_pwlib+set}" = set; then + withval=$with_pwlib; +case ${withval} in + n|no) + USE_PWLIB=no + ;; + y|ye|yes) + ;; + *) + PWLIB_DIR="${withval}" + ;; +esac + +fi + +if test "${USE_PWLIB}" != "no"; then + echo -n "checking for existence of pwlib... " + + saved_ldflags="${LDFLAGS}" + LDFLAGS="${LDFLAGS} -L${PWLIB_DIR} -l${PLATFORM_PTLIB}" + + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "${PWDIR_DIR}ptime.h" +int +main () +{ +int q = PTime::IsDaylightSaving(); + ; + 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 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + ac_cv_lib_pwlib="yes" + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ac_cv_lib_pwlib="no" + + +fi + +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + 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" + + fi + + PBX_LIBPWLIB=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBPWLIB 1 +_ACEOF + + 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_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-qt was given. +if test "${with_qt+set}" = set; then + withval=$with_qt; +case ${withval} in + n|no) + USE_QT=no + ;; + y|ye|yes) + QT_MANDATORY="yes" + ;; + *) + QT_DIR="${withval}" + QT_MANDATORY="yes" + ;; +esac + +fi + + +PBX_QT=0 +if test "${USE_QT}" != "no"; then + echo -n "checking for QDate in -lqt... " + saved_libs="${LIBS}" + saved_cppflags="${CPPFLAGS}" + if test "x${QT_DIR}" != "x"; then + LIBS="${LIBS} -L${QT_DIR}/lib" + CPPFLAGS="${CPPFLAGS} -I${QT_DIR}/include" + fi + LIBS="${LIBS} -lqt" + qtlib="qt" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +QDate date(); + ; + 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_qt_qt_date="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_qt_qt_date="no" +fi + +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${saved_libs}" + CPPFLAGS="${saved_cppflags}" + + if test "${ac_cv_lib_qt_qt_date}" = "no"; then + saved_libs="${LIBS}" + saved_cppflags="${CPPFLAGS}" + if test "x${QT_DIR}" != "x"; then + LIBS="${LIBS} -L${QT_DIR}/lib" + CPPFLAGS="${CPPFLAGS} -I${QT_DIR}/include" + fi + LIBS="${LIBS} -lqt-mt" + qtlib="qt-mt" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +QDate date(); + ; + 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_qt_qt_date="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_qt_qt_date="no" +fi + +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${saved_libs}" + CPPFLAGS="${saved_cppflags}" + fi + + if test "${ac_cv_lib_qt_qt_date}" = "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_qt_qt_date}" = "yes"; then + QT_LIB="-l${qtlib}" + if test "${QT_DIR}" != ""; then + QT_LIB="-L${QT_DIR}/lib ${QT_LIB}" + QT_INCLUDE="-I${QT_DIR}/include" + + fi + + PBX_QT=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBQT 1 +_ACEOF + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}moc", so it can be a program name with args. +set dummy ${ac_tool_prefix}moc; 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_QTMOC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $QTMOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_QTMOC="$QTMOC" # 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_QTMOC="$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 +QTMOC=$ac_cv_path_QTMOC +if test -n "$QTMOC"; then + { echo "$as_me:$LINENO: result: $QTMOC" >&5 +echo "${ECHO_T}$QTMOC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_QTMOC"; then + ac_pt_QTMOC=$QTMOC + # Extract the first word of "moc", so it can be a program name with args. +set dummy moc; 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_QTMOC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_QTMOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_QTMOC="$ac_pt_QTMOC" # 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_QTMOC="$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_QTMOC=$ac_cv_path_ac_pt_QTMOC +if test -n "$ac_pt_QTMOC"; then + { echo "$as_me:$LINENO: result: $ac_pt_QTMOC" >&5 +echo "${ECHO_T}$ac_pt_QTMOC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_QTMOC" = x; then + QTMOC="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@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@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + QTMOC=$ac_pt_QTMOC + fi +else + QTMOC="$ac_cv_path_QTMOC" +fi + + elif test ! -z "${QT_MANDATORY}"; + then + echo "***" + echo "*** The Qt installation on this system appears to be broken." + echo "*** Either correct the installation, or run configure" + echo "*** including --without-qt." + exit 1 + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + # Check whether --with-radiusclient-ng was given. if test "${with_radiusclient_ng+set}" = set; then @@ -14483,1767 +16829,6 @@ fi - -# Check whether --with-vorbis was given. -if test "${with_vorbis+set}" = set; then - withval=$with_vorbis; -case ${withval} in - n|no) - USE_VORBIS=no - ;; - y|ye|yes) - VORBIS_MANDATORY="yes" - ;; - *) - VORBIS_DIR="${withval}" - VORBIS_MANDATORY="yes" - ;; -esac - -fi - - -PBX_LIBVORBIS=0 - -if test "${USE_VORBIS}" != "no"; then - pbxlibdir="" - if test "x${VORBIS_DIR}" != "x"; then - pbxlibdir="-L${vorbis_DIR}/lib" - fi - { echo "$as_me:$LINENO: checking for vorbis_info_init in -lvorbis" >&5 -echo $ECHO_N "checking for vorbis_info_init in -lvorbis... $ECHO_C" >&6; } -if test "${ac_cv_lib_vorbis_vorbis_info_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lvorbis ${pbxlibdir} -lm -lvorbisenc $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 vorbis_info_init (); -int -main () -{ -return vorbis_info_init (); - ; - 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_vorbis_vorbis_info_init=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_vorbis_vorbis_info_init=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_vorbis_vorbis_info_init" >&5 -echo "${ECHO_T}$ac_cv_lib_vorbis_vorbis_info_init" >&6; } -if test $ac_cv_lib_vorbis_vorbis_info_init = yes; then - AST_VORBIS_FOUND=yes -else - AST_VORBIS_FOUND=no -fi - - - if test "${AST_VORBIS_FOUND}" = "yes"; then - VORBIS_LIB="-lvorbis -lm -lvorbisenc" - VORBIS_HEADER_FOUND="1" - if test "x${VORBIS_DIR}" != "x"; then - VORBIS_LIB="${pbxlibdir} ${VORBIS_LIB}" - VORBIS_INCLUDE="-I${VORBIS_DIR}/include" - if test "xvorbis/codec.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${VORBIS_DIR}/include/vorbis/codec.h" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${VORBIS_DIR}/include/vorbis/codec.h" >&5 -echo $ECHO_N "checking for ${VORBIS_DIR}/include/vorbis/codec.h... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${VORBIS_DIR}/include/vorbis/codec.h usability" >&5 -echo $ECHO_N "checking ${VORBIS_DIR}/include/vorbis/codec.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <${VORBIS_DIR}/include/vorbis/codec.h> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -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_compile") 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_objext' - { (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_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking ${VORBIS_DIR}/include/vorbis/codec.h presence" >&5 -echo $ECHO_N "checking ${VORBIS_DIR}/include/vorbis/codec.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <${VORBIS_DIR}/include/vorbis/codec.h> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 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); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for ${VORBIS_DIR}/include/vorbis/codec.h" >&5 -echo $ECHO_N "checking for ${VORBIS_DIR}/include/vorbis/codec.h... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - VORBIS_HEADER_FOUND=1 -else - VORBIS_HEADER_FOUND=0 -fi - - - fi - else - if test "xvorbis/codec.h" != "x" ; then - if test "${ac_cv_header_vorbis_codec_h+set}" = set; then - { echo "$as_me:$LINENO: checking for vorbis/codec.h" >&5 -echo $ECHO_N "checking for vorbis/codec.h... $ECHO_C" >&6; } -if test "${ac_cv_header_vorbis_codec_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_vorbis_codec_h" >&5 -echo "${ECHO_T}$ac_cv_header_vorbis_codec_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking vorbis/codec.h usability" >&5 -echo $ECHO_N "checking vorbis/codec.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -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_compile") 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_objext' - { (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_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking vorbis/codec.h presence" >&5 -echo $ECHO_N "checking vorbis/codec.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 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); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: vorbis/codec.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: vorbis/codec.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: vorbis/codec.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: vorbis/codec.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: vorbis/codec.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: vorbis/codec.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for vorbis/codec.h" >&5 -echo $ECHO_N "checking for vorbis/codec.h... $ECHO_C" >&6; } -if test "${ac_cv_header_vorbis_codec_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_vorbis_codec_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_vorbis_codec_h" >&5 -echo "${ECHO_T}$ac_cv_header_vorbis_codec_h" >&6; } - -fi -if test $ac_cv_header_vorbis_codec_h = yes; then - VORBIS_HEADER_FOUND=1 -else - VORBIS_HEADER_FOUND=0 -fi - - - fi - fi - if test "x${VORBIS_HEADER_FOUND}" = "x0" ; then - if test ! -z "${VORBIS_MANDATORY}" ; - then - echo " ***" - echo " *** It appears that you do not have the vorbis development package installed." - echo " *** Please install it to include Vorbis support, or re-run configure" - echo " *** without explicitly specifying --with-vorbis" - exit 1 - fi - VORBIS_LIB="" - VORBIS_INCLUDE="" - PBX_LIBVORBIS=0 - else - PBX_LIBVORBIS=1 - -cat >>confdefs.h <<_ACEOF -#define HAVE_VORBIS 1 -_ACEOF - - fi - elif test ! -z "${VORBIS_MANDATORY}"; - then - echo "***" - echo "*** The Vorbis installation on this system appears to be broken." - echo "*** Either correct the installation, or run configure" - echo "*** without explicity specifying --with-vorbis" - exit 1 - fi -fi - - - - - - -# Check whether --with-z was given. -if test "${with_z+set}" = set; then - withval=$with_z; -case ${withval} in - n|no) - USE_ZLIB=no - ;; - y|ye|yes) - ZLIB_MANDATORY="yes" - ;; - *) - ZLIB_DIR="${withval}" - ZLIB_MANDATORY="yes" - ;; -esac - -fi - - -PBX_LIBZLIB=0 - -if test "${USE_ZLIB}" != "no"; then - pbxlibdir="" - if test "x${ZLIB_DIR}" != "x"; then - pbxlibdir="-L${z_DIR}/lib" - fi - { echo "$as_me:$LINENO: checking for compress in -lz" >&5 -echo $ECHO_N "checking for compress in -lz... $ECHO_C" >&6; } -if test "${ac_cv_lib_z_compress+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz ${pbxlibdir} $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 compress (); -int -main () -{ -return compress (); - ; - 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_z_compress=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_z_compress=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_z_compress" >&5 -echo "${ECHO_T}$ac_cv_lib_z_compress" >&6; } -if test $ac_cv_lib_z_compress = yes; then - AST_ZLIB_FOUND=yes -else - AST_ZLIB_FOUND=no -fi - - - if test "${AST_ZLIB_FOUND}" = "yes"; then - ZLIB_LIB="-lz " - ZLIB_HEADER_FOUND="1" - if test "x${ZLIB_DIR}" != "x"; then - ZLIB_LIB="${pbxlibdir} ${ZLIB_LIB}" - ZLIB_INCLUDE="-I${ZLIB_DIR}/include" - if test "xzlib.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${ZLIB_DIR}/include/zlib.h" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${ZLIB_DIR}/include/zlib.h" >&5 -echo $ECHO_N "checking for ${ZLIB_DIR}/include/zlib.h... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${ZLIB_DIR}/include/zlib.h usability" >&5 -echo $ECHO_N "checking ${ZLIB_DIR}/include/zlib.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <${ZLIB_DIR}/include/zlib.h> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -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_compile") 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_objext' - { (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_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking ${ZLIB_DIR}/include/zlib.h presence" >&5 -echo $ECHO_N "checking ${ZLIB_DIR}/include/zlib.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <${ZLIB_DIR}/include/zlib.h> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 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); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for ${ZLIB_DIR}/include/zlib.h" >&5 -echo $ECHO_N "checking for ${ZLIB_DIR}/include/zlib.h... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - ZLIB_HEADER_FOUND=1 -else - ZLIB_HEADER_FOUND=0 -fi - - - fi - else - if test "xzlib.h" != "x" ; then - if test "${ac_cv_header_zlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -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_compile") 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_objext' - { (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_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 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); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_zlib_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } - -fi -if test $ac_cv_header_zlib_h = yes; then - ZLIB_HEADER_FOUND=1 -else - ZLIB_HEADER_FOUND=0 -fi - - - fi - fi - if test "x${ZLIB_HEADER_FOUND}" = "x0" ; then - if test ! -z "${ZLIB_MANDATORY}" ; - then - echo " ***" - echo " *** It appears that you do not have the z development package installed." - echo " *** Please install it to include zlib support, or re-run configure" - echo " *** without explicitly specifying --with-z" - exit 1 - fi - ZLIB_LIB="" - ZLIB_INCLUDE="" - PBX_LIBZLIB=0 - else - PBX_LIBZLIB=1 - -cat >>confdefs.h <<_ACEOF -#define HAVE_ZLIB 1 -_ACEOF - - fi - elif test ! -z "${ZLIB_MANDATORY}"; - then - echo "***" - echo "*** The zlib installation on this system appears to be broken." - echo "*** Either correct the installation, or run configure" - echo "*** without explicity specifying --with-z" - exit 1 - fi -fi - - - - - -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 - - -PBX_LIBOSS=0 -if test "${ac_cv_header_linux_soundcard_h+set}" = set; then - { echo "$as_me:$LINENO: checking for linux/soundcard.h" >&5 -echo $ECHO_N "checking for linux/soundcard.h... $ECHO_C" >&6; } -if test "${ac_cv_header_linux_soundcard_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_soundcard_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_soundcard_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking linux/soundcard.h usability" >&5 -echo $ECHO_N "checking linux/soundcard.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -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_compile") 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_objext' - { (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_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking linux/soundcard.h presence" >&5 -echo $ECHO_N "checking linux/soundcard.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 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); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: linux/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: linux/soundcard.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: linux/soundcard.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: linux/soundcard.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: linux/soundcard.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: linux/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: linux/soundcard.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: linux/soundcard.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for linux/soundcard.h" >&5 -echo $ECHO_N "checking for linux/soundcard.h... $ECHO_C" >&6; } -if test "${ac_cv_header_linux_soundcard_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_linux_soundcard_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_soundcard_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_soundcard_h" >&6; } - -fi -if test $ac_cv_header_linux_soundcard_h = yes; then - - PBX_LIBOSS=1 - -cat >>confdefs.h <<_ACEOF -#define HAVE_OSS 1 -_ACEOF - - -fi - - -if test "$PBX_LIBOSS" = "0"; then - if test "${ac_cv_header_sys_soundcard_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5 -echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_soundcard_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/soundcard.h usability" >&5 -echo $ECHO_N "checking sys/soundcard.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -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_compile") 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_objext' - { (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_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking sys/soundcard.h presence" >&5 -echo $ECHO_N "checking sys/soundcard.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 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); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/soundcard.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/soundcard.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5 -echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_soundcard_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sys_soundcard_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6; } - -fi -if test $ac_cv_header_sys_soundcard_h = yes; then - - PBX_LIBossaudio=1 - -cat >>confdefs.h <<_ACEOF -#define HAVE_OSS 1 -_ACEOF - - -fi - - -fi -if test "$PBX_LIBOSS" = "0"; then - - -# Check whether --with-ossaudio was given. -if test "${with_ossaudio+set}" = set; then - withval=$with_ossaudio; -case ${withval} in - n|no) - USE_OSS=no - ;; - y|ye|yes) - OSS_MANDATORY="yes" - ;; - *) - OSS_DIR="${withval}" - OSS_MANDATORY="yes" - ;; -esac - -fi - - -PBX_LIBOSS=0 - -if test "${USE_OSS}" != "no"; then - pbxlibdir="" - if test "x${OSS_DIR}" != "x"; then - pbxlibdir="-L${ossaudio_DIR}/lib" - fi - { echo "$as_me:$LINENO: checking for oss_ioctl_mixer in -lossaudio" >&5 -echo $ECHO_N "checking for oss_ioctl_mixer in -lossaudio... $ECHO_C" >&6; } -if test "${ac_cv_lib_ossaudio_oss_ioctl_mixer+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lossaudio ${pbxlibdir} $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 oss_ioctl_mixer (); -int -main () -{ -return oss_ioctl_mixer (); - ; - 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_ossaudio_oss_ioctl_mixer=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ossaudio_oss_ioctl_mixer=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_ossaudio_oss_ioctl_mixer" >&5 -echo "${ECHO_T}$ac_cv_lib_ossaudio_oss_ioctl_mixer" >&6; } -if test $ac_cv_lib_ossaudio_oss_ioctl_mixer = yes; then - AST_OSS_FOUND=yes -else - AST_OSS_FOUND=no -fi - - - if test "${AST_OSS_FOUND}" = "yes"; then - OSS_LIB="-lossaudio " - OSS_HEADER_FOUND="1" - if test "x${OSS_DIR}" != "x"; then - OSS_LIB="${pbxlibdir} ${OSS_LIB}" - OSS_INCLUDE="-I${OSS_DIR}/include" - if test "xsoundcard.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${OSS_DIR}/include/soundcard.h" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${OSS_DIR}/include/soundcard.h" >&5 -echo $ECHO_N "checking for ${OSS_DIR}/include/soundcard.h... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${OSS_DIR}/include/soundcard.h usability" >&5 -echo $ECHO_N "checking ${OSS_DIR}/include/soundcard.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <${OSS_DIR}/include/soundcard.h> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -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_compile") 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_objext' - { (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_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking ${OSS_DIR}/include/soundcard.h presence" >&5 -echo $ECHO_N "checking ${OSS_DIR}/include/soundcard.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <${OSS_DIR}/include/soundcard.h> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 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); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for ${OSS_DIR}/include/soundcard.h" >&5 -echo $ECHO_N "checking for ${OSS_DIR}/include/soundcard.h... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - OSS_HEADER_FOUND=1 -else - OSS_HEADER_FOUND=0 -fi - - - fi - else - if test "xsoundcard.h" != "x" ; then - if test "${ac_cv_header_soundcard_h+set}" = set; then - { echo "$as_me:$LINENO: checking for soundcard.h" >&5 -echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6; } -if test "${ac_cv_header_soundcard_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_soundcard_h" >&5 -echo "${ECHO_T}$ac_cv_header_soundcard_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking soundcard.h usability" >&5 -echo $ECHO_N "checking soundcard.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -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_compile") 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_objext' - { (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_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking soundcard.h presence" >&5 -echo $ECHO_N "checking soundcard.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 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); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: soundcard.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: soundcard.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: soundcard.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: soundcard.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: soundcard.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: soundcard.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: soundcard.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: soundcard.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: soundcard.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: soundcard.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for soundcard.h" >&5 -echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6; } -if test "${ac_cv_header_soundcard_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_soundcard_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_soundcard_h" >&5 -echo "${ECHO_T}$ac_cv_header_soundcard_h" >&6; } - -fi -if test $ac_cv_header_soundcard_h = yes; then - OSS_HEADER_FOUND=1 -else - OSS_HEADER_FOUND=0 -fi - - - fi - fi - if test "x${OSS_HEADER_FOUND}" = "x0" ; then - if test ! -z "${OSS_MANDATORY}" ; - then - echo " ***" - echo " *** It appears that you do not have the ossaudio development package installed." - echo " *** Please install it to include Open Sound System support, or re-run configure" - echo " *** without explicitly specifying --with-ossaudio" - exit 1 - fi - OSS_LIB="" - OSS_INCLUDE="" - PBX_LIBOSS=0 - else - PBX_LIBOSS=1 - -cat >>confdefs.h <<_ACEOF -#define HAVE_OSS 1 -_ACEOF - - fi - elif test ! -z "${OSS_MANDATORY}"; - then - echo "***" - echo "*** The Open Sound System installation on this system appears to be broken." - echo "*** Either correct the installation, or run configure" - echo "*** without explicity specifying --with-ossaudio" - exit 1 - fi -fi - - - - -fi - - - if test "${PBX_OSTYPE}" = "Linux" ; then @@ -17193,6 +17778,1090 @@ fi fi + +# Check whether --with-vorbis was given. +if test "${with_vorbis+set}" = set; then + withval=$with_vorbis; +case ${withval} in + n|no) + USE_VORBIS=no + ;; + y|ye|yes) + VORBIS_MANDATORY="yes" + ;; + *) + VORBIS_DIR="${withval}" + VORBIS_MANDATORY="yes" + ;; +esac + +fi + + +PBX_LIBVORBIS=0 + +if test "${USE_VORBIS}" != "no"; then + pbxlibdir="" + if test "x${VORBIS_DIR}" != "x"; then + pbxlibdir="-L${vorbis_DIR}/lib" + fi + { echo "$as_me:$LINENO: checking for vorbis_info_init in -lvorbis" >&5 +echo $ECHO_N "checking for vorbis_info_init in -lvorbis... $ECHO_C" >&6; } +if test "${ac_cv_lib_vorbis_vorbis_info_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lvorbis ${pbxlibdir} -lm -lvorbisenc $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 vorbis_info_init (); +int +main () +{ +return vorbis_info_init (); + ; + 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_vorbis_vorbis_info_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_vorbis_vorbis_info_init=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_vorbis_vorbis_info_init" >&5 +echo "${ECHO_T}$ac_cv_lib_vorbis_vorbis_info_init" >&6; } +if test $ac_cv_lib_vorbis_vorbis_info_init = yes; then + AST_VORBIS_FOUND=yes +else + AST_VORBIS_FOUND=no +fi + + + if test "${AST_VORBIS_FOUND}" = "yes"; then + VORBIS_LIB="-lvorbis -lm -lvorbisenc" + VORBIS_HEADER_FOUND="1" + if test "x${VORBIS_DIR}" != "x"; then + VORBIS_LIB="${pbxlibdir} ${VORBIS_LIB}" + VORBIS_INCLUDE="-I${VORBIS_DIR}/include" + if test "xvorbis/codec.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${VORBIS_DIR}/include/vorbis/codec.h" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for ${VORBIS_DIR}/include/vorbis/codec.h" >&5 +echo $ECHO_N "checking for ${VORBIS_DIR}/include/vorbis/codec.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ${VORBIS_DIR}/include/vorbis/codec.h usability" >&5 +echo $ECHO_N "checking ${VORBIS_DIR}/include/vorbis/codec.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <${VORBIS_DIR}/include/vorbis/codec.h> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +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_compile") 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_objext' + { (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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ${VORBIS_DIR}/include/vorbis/codec.h presence" >&5 +echo $ECHO_N "checking ${VORBIS_DIR}/include/vorbis/codec.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <${VORBIS_DIR}/include/vorbis/codec.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for ${VORBIS_DIR}/include/vorbis/codec.h" >&5 +echo $ECHO_N "checking for ${VORBIS_DIR}/include/vorbis/codec.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + VORBIS_HEADER_FOUND=1 +else + VORBIS_HEADER_FOUND=0 +fi + + + fi + else + if test "xvorbis/codec.h" != "x" ; then + if test "${ac_cv_header_vorbis_codec_h+set}" = set; then + { echo "$as_me:$LINENO: checking for vorbis/codec.h" >&5 +echo $ECHO_N "checking for vorbis/codec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_vorbis_codec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_vorbis_codec_h" >&5 +echo "${ECHO_T}$ac_cv_header_vorbis_codec_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking vorbis/codec.h usability" >&5 +echo $ECHO_N "checking vorbis/codec.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +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_compile") 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_objext' + { (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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking vorbis/codec.h presence" >&5 +echo $ECHO_N "checking vorbis/codec.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: vorbis/codec.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: vorbis/codec.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: vorbis/codec.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: vorbis/codec.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: vorbis/codec.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: vorbis/codec.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for vorbis/codec.h" >&5 +echo $ECHO_N "checking for vorbis/codec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_vorbis_codec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_vorbis_codec_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_vorbis_codec_h" >&5 +echo "${ECHO_T}$ac_cv_header_vorbis_codec_h" >&6; } + +fi +if test $ac_cv_header_vorbis_codec_h = yes; then + VORBIS_HEADER_FOUND=1 +else + VORBIS_HEADER_FOUND=0 +fi + + + fi + fi + if test "x${VORBIS_HEADER_FOUND}" = "x0" ; then + if test ! -z "${VORBIS_MANDATORY}" ; + then + echo " ***" + echo " *** It appears that you do not have the vorbis development package installed." + echo " *** Please install it to include Vorbis support, or re-run configure" + echo " *** without explicitly specifying --with-vorbis" + exit 1 + fi + VORBIS_LIB="" + VORBIS_INCLUDE="" + PBX_LIBVORBIS=0 + else + PBX_LIBVORBIS=1 + +cat >>confdefs.h <<_ACEOF +#define HAVE_VORBIS 1 +_ACEOF + + fi + elif test ! -z "${VORBIS_MANDATORY}"; + then + echo "***" + echo "*** The Vorbis installation on this system appears to be broken." + echo "*** Either correct the installation, or run configure" + echo "*** without explicity specifying --with-vorbis" + 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-vpb was given. +if test "${with_vpb+set}" = set; then + withval=$with_vpb; +case ${withval} in + n|no) + USE_VPB=no + ;; + y|ye|yes) + VPB_MANDATORY="yes" + ;; + *) + VPB_DIR="${withval}" + VPB_MANDATORY="yes" + ;; +esac + +fi + +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" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +int q = vpb_open(0,0); + ; + 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 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + ac_cv_lib_vpb_vpb_open="yes" + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ac_cv_lib_vpb_vpb_open="no" + + +fi + +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + 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" + + fi + + PBX_LIBvpb=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBVPB 1 +_ACEOF + + 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_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +# Check whether --with-z was given. +if test "${with_z+set}" = set; then + withval=$with_z; +case ${withval} in + n|no) + USE_ZLIB=no + ;; + y|ye|yes) + ZLIB_MANDATORY="yes" + ;; + *) + ZLIB_DIR="${withval}" + ZLIB_MANDATORY="yes" + ;; +esac + +fi + + +PBX_LIBZLIB=0 + +if test "${USE_ZLIB}" != "no"; then + pbxlibdir="" + if test "x${ZLIB_DIR}" != "x"; then + pbxlibdir="-L${z_DIR}/lib" + fi + { echo "$as_me:$LINENO: checking for compress in -lz" >&5 +echo $ECHO_N "checking for compress in -lz... $ECHO_C" >&6; } +if test "${ac_cv_lib_z_compress+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz ${pbxlibdir} $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 compress (); +int +main () +{ +return compress (); + ; + 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_z_compress=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_compress=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_z_compress" >&5 +echo "${ECHO_T}$ac_cv_lib_z_compress" >&6; } +if test $ac_cv_lib_z_compress = yes; then + AST_ZLIB_FOUND=yes +else + AST_ZLIB_FOUND=no +fi + + + if test "${AST_ZLIB_FOUND}" = "yes"; then + ZLIB_LIB="-lz " + ZLIB_HEADER_FOUND="1" + if test "x${ZLIB_DIR}" != "x"; then + ZLIB_LIB="${pbxlibdir} ${ZLIB_LIB}" + ZLIB_INCLUDE="-I${ZLIB_DIR}/include" + if test "xzlib.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${ZLIB_DIR}/include/zlib.h" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for ${ZLIB_DIR}/include/zlib.h" >&5 +echo $ECHO_N "checking for ${ZLIB_DIR}/include/zlib.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ${ZLIB_DIR}/include/zlib.h usability" >&5 +echo $ECHO_N "checking ${ZLIB_DIR}/include/zlib.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <${ZLIB_DIR}/include/zlib.h> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +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_compile") 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_objext' + { (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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ${ZLIB_DIR}/include/zlib.h presence" >&5 +echo $ECHO_N "checking ${ZLIB_DIR}/include/zlib.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <${ZLIB_DIR}/include/zlib.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for ${ZLIB_DIR}/include/zlib.h" >&5 +echo $ECHO_N "checking for ${ZLIB_DIR}/include/zlib.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + ZLIB_HEADER_FOUND=1 +else + ZLIB_HEADER_FOUND=0 +fi + + + fi + else + if test "xzlib.h" != "x" ; then + if test "${ac_cv_header_zlib_h+set}" = set; then + { echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +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_compile") 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_objext' + { (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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_zlib_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } + +fi +if test $ac_cv_header_zlib_h = yes; then + ZLIB_HEADER_FOUND=1 +else + ZLIB_HEADER_FOUND=0 +fi + + + fi + fi + if test "x${ZLIB_HEADER_FOUND}" = "x0" ; then + if test ! -z "${ZLIB_MANDATORY}" ; + then + echo " ***" + echo " *** It appears that you do not have the z development package installed." + echo " *** Please install it to include zlib support, or re-run configure" + echo " *** without explicitly specifying --with-z" + exit 1 + fi + ZLIB_LIB="" + ZLIB_INCLUDE="" + PBX_LIBZLIB=0 + else + PBX_LIBZLIB=1 + +cat >>confdefs.h <<_ACEOF +#define HAVE_ZLIB 1 +_ACEOF + + fi + elif test ! -z "${ZLIB_MANDATORY}"; + then + echo "***" + echo "*** The zlib installation on this system appears to be broken." + echo "*** Either correct the installation, or run configure" + echo "*** without explicity specifying --with-z" + exit 1 + fi +fi + + + + + + # Check whether --with-zaptel was given. if test "${with_zaptel+set}" = set; then withval=$with_zaptel; @@ -17214,12 +18883,7 @@ fi 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 + 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" @@ -17231,7 +18895,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${zapheader}> +#include int main () { @@ -17315,607 +18979,20 @@ fi -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 +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 - 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 + echo "*** termcap support not found" + exit 1 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 - - - - - - -# Check whether --with-pq was given. -if test "${with_pq+set}" = set; then - withval=$with_pq; -case ${withval} in - n|no) - USE_PQ=no - ;; - y|ye|yes) - PQ_MANDATORY="yes" - ;; - *) - PQ_DIR="${withval}" - PQ_MANDATORY="yes" - ;; -esac - -fi - - -PBX_LIBpq=0 -PG_CONFIG=No -if test "${USE_PQ}" != "no"; then - if test "x${PQ_DIR}" != "x"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pg_config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pg_config; 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_PG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in ${PQ_DIR}/bin -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_PG_CONFIG="$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 -PG_CONFIG=$ac_cv_path_PG_CONFIG -if test -n "$PG_CONFIG"; then - { echo "$as_me:$LINENO: result: $PG_CONFIG" >&5 -echo "${ECHO_T}$PG_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PG_CONFIG"; then - ac_pt_PG_CONFIG=$PG_CONFIG - # Extract the first word of "pg_config", so it can be a program name with args. -set dummy pg_config; 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_PG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_pt_PG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PG_CONFIG="$ac_pt_PG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in ${PQ_DIR}/bin -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_PG_CONFIG="$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_PG_CONFIG=$ac_cv_path_ac_pt_PG_CONFIG -if test -n "$ac_pt_PG_CONFIG"; then - { echo "$as_me:$LINENO: result: $ac_pt_PG_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_PG_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_pt_PG_CONFIG" = x; then - PG_CONFIG="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@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@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - PG_CONFIG=$ac_pt_PG_CONFIG - fi -else - PG_CONFIG="$ac_cv_path_PG_CONFIG" -fi - - if test x"${PG_CONFIG}" = xNo; then - echo "***" - echo "*** pg_config was not found in the path you specified:" - echo "*** ${PQ_DIR}/bin" - echo "*** Either correct the installation, or run configure" - echo "*** including --without-pq" - exit 1 - fi - else - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pg_config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pg_config; 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_PG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PG_CONFIG="$PG_CONFIG" # 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_PG_CONFIG="$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 -PG_CONFIG=$ac_cv_path_PG_CONFIG -if test -n "$PG_CONFIG"; then - { echo "$as_me:$LINENO: result: $PG_CONFIG" >&5 -echo "${ECHO_T}$PG_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PG_CONFIG"; then - ac_pt_PG_CONFIG=$PG_CONFIG - # Extract the first word of "pg_config", so it can be a program name with args. -set dummy pg_config; 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_PG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_pt_PG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PG_CONFIG="$ac_pt_PG_CONFIG" # 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_PG_CONFIG="$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_PG_CONFIG=$ac_cv_path_ac_pt_PG_CONFIG -if test -n "$ac_pt_PG_CONFIG"; then - { echo "$as_me:$LINENO: result: $ac_pt_PG_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_PG_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_pt_PG_CONFIG" = x; then - PG_CONFIG="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@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@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - PG_CONFIG=$ac_pt_PG_CONFIG - fi -else - PG_CONFIG="$ac_cv_path_PG_CONFIG" -fi - - fi -fi - -if test x"${PG_CONFIG}" != xNo; then - PQ_libdir=`pg_config --libdir` - PQ_includedir=`pg_config --includedir` - - { echo "$as_me:$LINENO: checking for PQexec in -lpq" >&5 -echo $ECHO_N "checking for PQexec in -lpq... $ECHO_C" >&6; } -if test "${ac_cv_lib_pq_PQexec+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpq -L${PQ_libdir} -lz $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 PQexec (); -int -main () -{ -return PQexec (); - ; - 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_pq_PQexec=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pq_PQexec=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_pq_PQexec" >&5 -echo "${ECHO_T}$ac_cv_lib_pq_PQexec" >&6; } -if test $ac_cv_lib_pq_PQexec = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_PQ 1 -_ACEOF - -fi - - - if test "${ac_cv_lib_pq_PQexec}" = "yes"; then - pq_LIB="-L${PQ_libdir} -lpq -lz" - pq_INCLUDE="-I${PQ_includedir}" - PBX_LIBpq=1 - 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 -fi - - - - -NETSNMP_LIBS= -PBX_NETSNMP=0 -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}net-snmp-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}net-snmp-config; 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_NET_SNMP_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $NET_SNMP_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_NET_SNMP_CONFIG="$NET_SNMP_CONFIG" # 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_NET_SNMP_CONFIG="$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 -NET_SNMP_CONFIG=$ac_cv_path_NET_SNMP_CONFIG -if test -n "$NET_SNMP_CONFIG"; then - { echo "$as_me:$LINENO: result: $NET_SNMP_CONFIG" >&5 -echo "${ECHO_T}$NET_SNMP_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_NET_SNMP_CONFIG"; then - ac_pt_NET_SNMP_CONFIG=$NET_SNMP_CONFIG - # Extract the first word of "net-snmp-config", so it can be a program name with args. -set dummy net-snmp-config; 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_NET_SNMP_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_pt_NET_SNMP_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_NET_SNMP_CONFIG="$ac_pt_NET_SNMP_CONFIG" # 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_NET_SNMP_CONFIG="$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_NET_SNMP_CONFIG=$ac_cv_path_ac_pt_NET_SNMP_CONFIG -if test -n "$ac_pt_NET_SNMP_CONFIG"; then - { echo "$as_me:$LINENO: result: $ac_pt_NET_SNMP_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_NET_SNMP_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_pt_NET_SNMP_CONFIG" = x; then - NET_SNMP_CONFIG="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@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@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - NET_SNMP_CONFIG=$ac_pt_NET_SNMP_CONFIG - fi -else - NET_SNMP_CONFIG="$ac_cv_path_NET_SNMP_CONFIG" -fi - -if test "x${NET_SNMP_CONFIG}" != "xNo" ; then - NETSNMP_LIBS=`${NET_SNMP_CONFIG} --agent-libs` - PBX_NETSNMP=1 -fi - - if test "${ac_cv_header_h323_h+set}" = set; then { echo "$as_me:$LINENO: checking for h323.h" >&5 @@ -18150,681 +19227,6 @@ 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-vpb was given. -if test "${with_vpb+set}" = set; then - withval=$with_vpb; -case ${withval} in - n|no) - USE_VPB=no - ;; - y|ye|yes) - VPB_MANDATORY="yes" - ;; - *) - VPB_DIR="${withval}" - VPB_MANDATORY="yes" - ;; -esac - -fi - -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" - -cat >conftest.$ac_ext <<_ACEOF - - /* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -int q = vpb_open(0,0); - ; - 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 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - ac_cv_lib_vpb_vpb_open="yes" - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ac_cv_lib_vpb_vpb_open="no" - - -fi - -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - 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" - - fi - - PBX_LIBvpb=1 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBVPB 1 -_ACEOF - - 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 - - - -# Check whether --with-qt was given. -if test "${with_qt+set}" = set; then - withval=$with_qt; -case ${withval} in - n|no) - USE_QT=no - ;; - y|ye|yes) - QT_MANDATORY="yes" - ;; - *) - QT_DIR="${withval}" - QT_MANDATORY="yes" - ;; -esac - -fi - - -PBX_QT=0 -if test "${USE_QT}" != "no"; then - echo -n "checking for QDate in -lqt... " - saved_libs="${LIBS}" - saved_cppflags="${CPPFLAGS}" - if test "x${QT_DIR}" != "x"; then - LIBS="${LIBS} -L${QT_DIR}/lib" - CPPFLAGS="${CPPFLAGS} -I${QT_DIR}/include" - fi - LIBS="${LIBS} -lqt" - qtlib="qt" - cat >conftest.$ac_ext <<_ACEOF - - /* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -QDate date(); - ; - 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_qt_qt_date="yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_qt_qt_date="no" -fi - -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="${saved_libs}" - CPPFLAGS="${saved_cppflags}" - - if test "${ac_cv_lib_qt_qt_date}" = "no"; then - saved_libs="${LIBS}" - saved_cppflags="${CPPFLAGS}" - if test "x${QT_DIR}" != "x"; then - LIBS="${LIBS} -L${QT_DIR}/lib" - CPPFLAGS="${CPPFLAGS} -I${QT_DIR}/include" - fi - LIBS="${LIBS} -lqt-mt" - qtlib="qt-mt" - cat >conftest.$ac_ext <<_ACEOF - - /* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -QDate date(); - ; - 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_qt_qt_date="yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_qt_qt_date="no" -fi - -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="${saved_libs}" - CPPFLAGS="${saved_cppflags}" - fi - - if test "${ac_cv_lib_qt_qt_date}" = "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_qt_qt_date}" = "yes"; then - QT_LIB="-l${qtlib}" - if test "${QT_DIR}" != ""; then - QT_LIB="-L${QT_DIR}/lib ${QT_LIB}" - QT_INCLUDE="-I${QT_DIR}/include" - - fi - - PBX_QT=1 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBQT 1 -_ACEOF - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}moc", so it can be a program name with args. -set dummy ${ac_tool_prefix}moc; 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_QTMOC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $QTMOC in - [\\/]* | ?:[\\/]*) - ac_cv_path_QTMOC="$QTMOC" # 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_QTMOC="$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 -QTMOC=$ac_cv_path_QTMOC -if test -n "$QTMOC"; then - { echo "$as_me:$LINENO: result: $QTMOC" >&5 -echo "${ECHO_T}$QTMOC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_QTMOC"; then - ac_pt_QTMOC=$QTMOC - # Extract the first word of "moc", so it can be a program name with args. -set dummy moc; 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_QTMOC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_pt_QTMOC in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_QTMOC="$ac_pt_QTMOC" # 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_QTMOC="$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_QTMOC=$ac_cv_path_ac_pt_QTMOC -if test -n "$ac_pt_QTMOC"; then - { echo "$as_me:$LINENO: result: $ac_pt_QTMOC" >&5 -echo "${ECHO_T}$ac_pt_QTMOC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_pt_QTMOC" = x; then - QTMOC="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@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@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - QTMOC=$ac_pt_QTMOC - fi -else - QTMOC="$ac_cv_path_QTMOC" -fi - - elif test ! -z "${QT_MANDATORY}"; - then - echo "***" - echo "*** The Qt installation on this system appears to be broken." - echo "*** Either correct the installation, or run configure" - echo "*** including --without-qt." - exit 1 - fi -fi - - - -# 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@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@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' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - PBX_GTK=0 if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gtk-config", so it can be a program name with args. @@ -18936,128 +19338,6 @@ fi -PLATFORM_PTLIB="ptlib_${OSTYPE}_${MACHTYPE}_r" - - -# Check whether --with-pwlib was given. -if test "${with_pwlib+set}" = set; then - withval=$with_pwlib; -case ${withval} in - n|no) - USE_PWLIB=no - ;; - y|ye|yes) - ;; - *) - PWLIB_DIR="${withval}" - ;; -esac - -fi - -if test "${USE_PWLIB}" != "no"; then - echo -n "checking for existence of pwlib... " - - saved_ldflags="${LDFLAGS}" - LDFLAGS="${LDFLAGS} -L${PWLIB_DIR} -l${PLATFORM_PTLIB}" - - cat >conftest.$ac_ext <<_ACEOF - - /* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include "${PWDIR_DIR}ptime.h" -int -main () -{ -int q = PTime::IsDaylightSaving(); - ; - 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 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - ac_cv_lib_pwlib="yes" - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ac_cv_lib_pwlib="no" - - -fi - -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - 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" - - fi - - PBX_LIBPWLIB=1 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBPWLIB 1 -_ACEOF - - 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 - - PBX_CURL=0 if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}curl-config", so it can be a program name with args. @@ -27324,8 +27604,8 @@ PBX_LIBALSA!$PBX_LIBALSA$ac_delim CURSES_LIB!$CURSES_LIB$ac_delim CURSES_INCLUDE!$CURSES_INCLUDE$ac_delim PBX_LIBCURSES!$PBX_LIBCURSES$ac_delim -IKSEMEL_LIB!$IKSEMEL_LIB$ac_delim -IKSEMEL_INCLUDE!$IKSEMEL_INCLUDE$ac_delim +gsm_LIB!$gsm_LIB$ac_delim +gsm_INCLUDE!$gsm_INCLUDE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -27367,6 +27647,14 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +PBX_LIBgsm!$PBX_LIBgsm$ac_delim +KDE_INCLUDE!$KDE_INCLUDE$ac_delim +KDE_LIBS!$KDE_LIBS$ac_delim +PBX_KDE!$PBX_KDE$ac_delim +KDEINIT!$KDEINIT$ac_delim +KDEDIR!$KDEDIR$ac_delim +IKSEMEL_LIB!$IKSEMEL_LIB$ac_delim +IKSEMEL_INCLUDE!$IKSEMEL_INCLUDE$ac_delim PBX_LIBIKSEMEL!$PBX_LIBIKSEMEL$ac_delim NBS_LIB!$NBS_LIB$ac_delim NBS_INCLUDE!$NBS_INCLUDE$ac_delim @@ -27374,6 +27662,9 @@ PBX_LIBNBS!$PBX_LIBNBS$ac_delim NCURSES_LIB!$NCURSES_LIB$ac_delim NCURSES_INCLUDE!$NCURSES_INCLUDE$ac_delim PBX_LIBNCURSES!$PBX_LIBNCURSES$ac_delim +NETSNMP_CONFIG!$NETSNMP_CONFIG$ac_delim +NETSNMP_LIB!$NETSNMP_LIB$ac_delim +PBX_NETSNMP!$PBX_NETSNMP$ac_delim NEWT_LIB!$NEWT_LIB$ac_delim NEWT_INCLUDE!$NEWT_INCLUDE$ac_delim PBX_LIBNEWT!$PBX_LIBNEWT$ac_delim @@ -27386,12 +27677,26 @@ PBX_LIBOGG!$PBX_LIBOGG$ac_delim OSPTK_LIB!$OSPTK_LIB$ac_delim OSPTK_INCLUDE!$OSPTK_INCLUDE$ac_delim PBX_LIBOSPTK!$PBX_LIBOSPTK$ac_delim +OSS_LIB!$OSS_LIB$ac_delim +OSS_INCLUDE!$OSS_INCLUDE$ac_delim +PBX_LIBOSS!$PBX_LIBOSS$ac_delim +PG_CONFIG!$PG_CONFIG$ac_delim +pq_INCLUDE!$pq_INCLUDE$ac_delim +pq_LIB!$pq_LIB$ac_delim +PBX_LIBpq!$PBX_LIBpq$ac_delim POPT_LIB!$POPT_LIB$ac_delim POPT_INCLUDE!$POPT_INCLUDE$ac_delim PBX_LIBPOPT!$PBX_LIBPOPT$ac_delim LIBPRI_LIB!$LIBPRI_LIB$ac_delim LIBPRI_INCLUDE!$LIBPRI_INCLUDE$ac_delim PBX_LIBLIBPRI!$PBX_LIBLIBPRI$ac_delim +PWLIB_INCLUDE!$PWLIB_INCLUDE$ac_delim +PWLIB_LIB!$PWLIB_LIB$ac_delim +PBX_LIBPWLIB!$PBX_LIBPWLIB$ac_delim +QT_INCLUDE!$QT_INCLUDE$ac_delim +QT_LIB!$QT_LIB$ac_delim +QTMOC!$QTMOC$ac_delim +PBX_QT!$PBX_QT$ac_delim RADIUSCLIENT_LIB!$RADIUSCLIENT_LIB$ac_delim RADIUSCLIENT_INCLUDE!$RADIUSCLIENT_INCLUDE$ac_delim PBX_LIBRADIUSCLIENT!$PBX_LIBRADIUSCLIENT$ac_delim @@ -27413,52 +27718,27 @@ PBX_LIBTERMCAP!$PBX_LIBTERMCAP$ac_delim TINFO_LIB!$TINFO_LIB$ac_delim TINFO_INCLUDE!$TINFO_INCLUDE$ac_delim PBX_LIBTINFO!$PBX_LIBTINFO$ac_delim -VORBIS_LIB!$VORBIS_LIB$ac_delim -VORBIS_INCLUDE!$VORBIS_INCLUDE$ac_delim -PBX_LIBVORBIS!$PBX_LIBVORBIS$ac_delim -ZLIB_LIB!$ZLIB_LIB$ac_delim -ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim -PBX_LIBZLIB!$PBX_LIBZLIB$ac_delim -EDITLINE_LIBS!$EDITLINE_LIBS$ac_delim -OSS_LIB!$OSS_LIB$ac_delim -OSS_INCLUDE!$OSS_INCLUDE$ac_delim -PBX_LIBOSS!$PBX_LIBOSS$ac_delim TONEZONE_LIB!$TONEZONE_LIB$ac_delim TONEZONE_INCLUDE!$TONEZONE_INCLUDE$ac_delim PBX_LIBTONEZONE!$PBX_LIBTONEZONE$ac_delim -ZAPTEL_INCLUDE!$ZAPTEL_INCLUDE$ac_delim -PBX_ZAPTEL!$PBX_ZAPTEL$ac_delim -gsm_LIB!$gsm_LIB$ac_delim -gsm_INCLUDE!$gsm_INCLUDE$ac_delim -PBX_LIBgsm!$PBX_LIBgsm$ac_delim -PG_CONFIG!$PG_CONFIG$ac_delim -pq_INCLUDE!$pq_INCLUDE$ac_delim -pq_LIB!$pq_LIB$ac_delim -PBX_LIBpq!$PBX_LIBpq$ac_delim -NET_SNMP_CONFIG!$NET_SNMP_CONFIG$ac_delim -NETSNMP_LIBS!$NETSNMP_LIBS$ac_delim -PBX_NETSNMP!$PBX_NETSNMP$ac_delim -PBX_H323!$PBX_H323$ac_delim -PBX_IXJUSER!$PBX_IXJUSER$ac_delim +VORBIS_LIB!$VORBIS_LIB$ac_delim +VORBIS_INCLUDE!$VORBIS_INCLUDE$ac_delim +PBX_LIBVORBIS!$PBX_LIBVORBIS$ac_delim VPB_INCLUDE!$VPB_INCLUDE$ac_delim VPB_LIB!$VPB_LIB$ac_delim PBX_LIBvpb!$PBX_LIBvpb$ac_delim -QT_INCLUDE!$QT_INCLUDE$ac_delim -QT_LIB!$QT_LIB$ac_delim -QTMOC!$QTMOC$ac_delim -PBX_QT!$PBX_QT$ac_delim -KDE_INCLUDE!$KDE_INCLUDE$ac_delim -KDE_LIBS!$KDE_LIBS$ac_delim -PBX_KDE!$PBX_KDE$ac_delim -KDEINIT!$KDEINIT$ac_delim -KDEDIR!$KDEDIR$ac_delim +ZLIB_LIB!$ZLIB_LIB$ac_delim +ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim +PBX_LIBZLIB!$PBX_LIBZLIB$ac_delim +ZAPTEL_INCLUDE!$ZAPTEL_INCLUDE$ac_delim +PBX_ZAPTEL!$PBX_ZAPTEL$ac_delim +EDITLINE_LIBS!$EDITLINE_LIBS$ac_delim +PBX_H323!$PBX_H323$ac_delim +PBX_IXJUSER!$PBX_IXJUSER$ac_delim GTKCONFIG!$GTKCONFIG$ac_delim PBX_GTK!$PBX_GTK$ac_delim GTK_INCLUDE!$GTK_INCLUDE$ac_delim GTK_LIBS!$GTK_LIBS$ac_delim -PWLIB_INCLUDE!$PWLIB_INCLUDE$ac_delim -PWLIB_LIB!$PWLIB_LIB$ac_delim -PBX_LIBPWLIB!$PBX_LIBPWLIB$ac_delim CURL!$CURL$ac_delim PBX_CURL!$PBX_CURL$ac_delim CURLLIBS!$CURLLIBS$ac_delim diff --git a/configure.ac b/configure.ac index e28aef4fc6..85e8ec8f67 100644 --- a/configure.ac +++ b/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 - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - #include - #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 ], - [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 ], + [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 ], + [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 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + #include + #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 diff --git a/formats/Makefile b/formats/Makefile index 8440aa0dd7..351f1e8a10 100644 --- a/formats/Makefile +++ b/formats/Makefile @@ -5,51 +5,16 @@ # # Copyright (C) 1999-2006, Digium, Inc. # -# Mark Spencer -# # 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 diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c index d3959745e6..a9f9262513 100644 --- a/formats/format_ogg_vorbis.c +++ b/formats/format_ogg_vorbis.c @@ -23,7 +23,7 @@ /*** MODULEINFO libvorbis - ogg + libogg ***/ #include "asterisk.h" diff --git a/funcs/Makefile b/funcs/Makefile index b9e55d1e61..381a3d72cd 100644 --- a/funcs/Makefile +++ b/funcs/Makefile @@ -5,14 +5,10 @@ # # Copyright (C) 2005-2006, Digium, Inc. # -# Kevin P. Fleming -# # 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 diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in index a0cf4bc9ea..fd441011a2 100644 --- a/include/asterisk/autoconfig.h.in +++ b/include/asterisk/autoconfig.h.in @@ -200,6 +200,9 @@ /* Define to 1 if you have the 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 diff --git a/include/asterisk/translate.h b/include/asterisk/translate.h index 29c3fd56c4..ed6f6275bf 100644 --- a/include/asterisk/translate.h +++ b/include/asterisk/translate.h @@ -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); diff --git a/makeopts.in b/makeopts.in index 28da92e85a..c2a7565e64 100644 --- a/makeopts.in +++ b/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@ diff --git a/pbx/Makefile b/pbx/Makefile index 74168c0700..c505d417e7 100644 --- a/pbx/Makefile +++ b/pbx/Makefile @@ -5,91 +5,35 @@ # # Copyright (C) 1999-2006, Digium, Inc. # -# Mark Spencer -# # 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` diff --git a/res/Makefile b/res/Makefile index 4c92c5e7cf..3fc5a406bc 100644 --- a/res/Makefile +++ b/res/Makefile @@ -3,16 +3,12 @@ # # Makefile for resource modules # -# Copyright (C) 1999-2006, Digium -# -# Mark Spencer +# 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 diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index b19fb69fce..379f33c4e1 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -27,6 +27,7 @@ /*** MODULEINFO win32 + zaptel ***/ #include "asterisk.h" @@ -49,11 +50,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #ifdef HAVE_ZAPTEL -#ifdef __linux__ -#include -#else #include -#endif /* __linux__ */ #endif #include "asterisk/lock.h" diff --git a/res/res_snmp.c b/res/res_snmp.c index bacc43962c..3848e93304 100644 --- a/res/res_snmp.c +++ b/res/res_snmp.c @@ -16,7 +16,6 @@ /*** MODULEINFO netsnmp - no ***/ #include "asterisk.h" diff --git a/translate.c b/translate.c index 256130c828..a1651f2dbf 100644 --- a/translate.c +++ b/translate.c @@ -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; }