[svn-commits] oej: branch oej/02-labarea r39193 - in /team/oej/02-labarea: ./ agi/ apps/ bu...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Aug 7 10:37:47 MST 2006


Author: oej
Date: Mon Aug  7 12:37:45 2006
New Revision: 39193

URL: http://svn.digium.com/view/asterisk?rev=39193&view=rev
Log:
Reset automerge on this experimental branch

Added:
    team/oej/02-labarea/Makefile.moddir_rules
      - copied unchanged from r39182, trunk/Makefile.moddir_rules
    team/oej/02-labarea/Makefile.rules
      - copied unchanged from r39182, trunk/Makefile.rules
    team/oej/02-labarea/channels/chan_vpb.cc
      - copied unchanged from r39182, trunk/channels/chan_vpb.cc
    team/oej/02-labarea/codecs/codec_zap.c
      - copied unchanged from r39182, trunk/codecs/codec_zap.c
    team/oej/02-labarea/configs/sla.conf.sample
      - copied unchanged from r39182, trunk/configs/sla.conf.sample
    team/oej/02-labarea/doc/osp.txt
      - copied unchanged from r39182, trunk/doc/osp.txt
    team/oej/02-labarea/pbx/ael/ael-test/ael-ntest10/
      - copied from r39182, trunk/pbx/ael/ael-test/ael-ntest10/
    team/oej/02-labarea/pbx/ael/ael-test/ael-ntest10/extensions.ael
      - copied unchanged from r39182, trunk/pbx/ael/ael-test/ael-ntest10/extensions.ael
    team/oej/02-labarea/pbx/ael/ael-test/ael-ntest12/
      - copied from r39182, trunk/pbx/ael/ael-test/ael-ntest12/
    team/oej/02-labarea/pbx/ael/ael-test/ael-ntest12/extensions.ael
      - copied unchanged from r39182, trunk/pbx/ael/ael-test/ael-ntest12/extensions.ael
    team/oej/02-labarea/pbx/ael/ael-test/ael-ntest9/
      - copied from r39182, trunk/pbx/ael/ael-test/ael-ntest9/
    team/oej/02-labarea/pbx/ael/ael-test/ael-ntest9/extensions.ael
      - copied unchanged from r39182, trunk/pbx/ael/ael-test/ael-ntest9/extensions.ael
    team/oej/02-labarea/pbx/ael/ael-test/ael-test11/
      - copied from r39182, trunk/pbx/ael/ael-test/ael-test11/
    team/oej/02-labarea/pbx/ael/ael-test/ael-test11/extensions.ael
      - copied unchanged from r39182, trunk/pbx/ael/ael-test/ael-test11/extensions.ael
    team/oej/02-labarea/pbx/ael/ael-test/ref.ael-ntest10
      - copied unchanged from r39182, trunk/pbx/ael/ael-test/ref.ael-ntest10
    team/oej/02-labarea/pbx/ael/ael-test/ref.ael-ntest12
      - copied unchanged from r39182, trunk/pbx/ael/ael-test/ref.ael-ntest12
    team/oej/02-labarea/pbx/ael/ael-test/ref.ael-ntest9
      - copied unchanged from r39182, trunk/pbx/ael/ael-test/ref.ael-ntest9
    team/oej/02-labarea/pbx/ael/ael-test/ref.ael-test11
      - copied unchanged from r39182, trunk/pbx/ael/ael-test/ref.ael-test11
    team/oej/02-labarea/pbx/kdeconsole_main.cc
      - copied unchanged from r39182, trunk/pbx/kdeconsole_main.cc
Removed:
    team/oej/02-labarea/build_tools/Makefile
    team/oej/02-labarea/build_tools/menuselect.c
    team/oej/02-labarea/build_tools/menuselect.h
    team/oej/02-labarea/build_tools/menuselect_curses.c
    team/oej/02-labarea/channels/chan_vpb.c
    team/oej/02-labarea/codecs/codec_g723_1.c
    team/oej/02-labarea/codecs/g723_slin_ex.h
    team/oej/02-labarea/codecs/slin_g723_ex.h
    team/oej/02-labarea/mxml/
    team/oej/02-labarea/pbx/pbx_kdeconsole_main.cc
    team/oej/02-labarea/res/res_osp.c
Modified:
    team/oej/02-labarea/   (props changed)
    team/oej/02-labarea/.cleancount
    team/oej/02-labarea/Makefile
    team/oej/02-labarea/UPGRADE.txt
    team/oej/02-labarea/acinclude.m4
    team/oej/02-labarea/acl.c
    team/oej/02-labarea/agi/Makefile
    team/oej/02-labarea/app.c
    team/oej/02-labarea/apps/Makefile
    team/oej/02-labarea/apps/app_chanspy.c
    team/oej/02-labarea/apps/app_dial.c
    team/oej/02-labarea/apps/app_directed_pickup.c
    team/oej/02-labarea/apps/app_directory.c
    team/oej/02-labarea/apps/app_disa.c
    team/oej/02-labarea/apps/app_dumpchan.c
    team/oej/02-labarea/apps/app_flash.c
    team/oej/02-labarea/apps/app_followme.c
    team/oej/02-labarea/apps/app_meetme.c
    team/oej/02-labarea/apps/app_osplookup.c
    team/oej/02-labarea/apps/app_queue.c
    team/oej/02-labarea/apps/app_rpt.c
    team/oej/02-labarea/apps/app_sms.c
    team/oej/02-labarea/apps/app_speech_utils.c
    team/oej/02-labarea/apps/app_voicemail.c
    team/oej/02-labarea/apps/app_zapbarge.c
    team/oej/02-labarea/apps/app_zapras.c
    team/oej/02-labarea/apps/app_zapscan.c
    team/oej/02-labarea/ast_expr2f.c
    team/oej/02-labarea/asterisk.c
    team/oej/02-labarea/autoservice.c
    team/oej/02-labarea/build_tools/menuselect-deps.in
    team/oej/02-labarea/build_tools/prep_moduledeps
    team/oej/02-labarea/cdr/Makefile
    team/oej/02-labarea/cdr/cdr_radius.c
    team/oej/02-labarea/channel.c
    team/oej/02-labarea/channels/   (props changed)
    team/oej/02-labarea/channels/Makefile
    team/oej/02-labarea/channels/chan_agent.c
    team/oej/02-labarea/channels/chan_alsa.c
    team/oej/02-labarea/channels/chan_h323.c
    team/oej/02-labarea/channels/chan_iax2.c
    team/oej/02-labarea/channels/chan_jingle.c
    team/oej/02-labarea/channels/chan_mgcp.c
    team/oej/02-labarea/channels/chan_misdn.c
    team/oej/02-labarea/channels/chan_nbs.c
    team/oej/02-labarea/channels/chan_oss.c
    team/oej/02-labarea/channels/chan_phone.c
    team/oej/02-labarea/channels/chan_sip.c
    team/oej/02-labarea/channels/chan_skinny.c
    team/oej/02-labarea/channels/chan_zap.c
    team/oej/02-labarea/channels/h323/Makefile
    team/oej/02-labarea/channels/iax2-parser.c
    team/oej/02-labarea/channels/iax2-provision.c
    team/oej/02-labarea/channels/misdn/Makefile
    team/oej/02-labarea/channels/misdn/chan_misdn_config.h
    team/oej/02-labarea/channels/misdn/ie.c
    team/oej/02-labarea/channels/misdn/isdn_lib.c
    team/oej/02-labarea/channels/misdn/isdn_lib.h
    team/oej/02-labarea/channels/misdn/isdn_lib_intern.h
    team/oej/02-labarea/channels/misdn/isdn_msg_parser.c
    team/oej/02-labarea/channels/misdn_config.c
    team/oej/02-labarea/cli.c
    team/oej/02-labarea/codecs/Makefile
    team/oej/02-labarea/codecs/codec_g726.c
    team/oej/02-labarea/codecs/codec_gsm.c
    team/oej/02-labarea/codecs/codec_ilbc.c
    team/oej/02-labarea/codecs/codec_lpc10.c
    team/oej/02-labarea/codecs/codec_speex.c
    team/oej/02-labarea/codecs/gsm/Makefile
    team/oej/02-labarea/codecs/gsm/src/preprocess.c
    team/oej/02-labarea/codecs/ilbc/Makefile
    team/oej/02-labarea/codecs/lpc10/Makefile
    team/oej/02-labarea/config.c
    team/oej/02-labarea/configs/alsa.conf.sample
    team/oej/02-labarea/configs/extconfig.conf.sample
    team/oej/02-labarea/configs/extensions.conf.sample
    team/oej/02-labarea/configs/features.conf.sample
    team/oej/02-labarea/configs/func_odbc.conf.sample
    team/oej/02-labarea/configs/iax.conf.sample
    team/oej/02-labarea/configs/indications.conf.sample
    team/oej/02-labarea/configs/manager.conf.sample
    team/oej/02-labarea/configs/misdn.conf.sample
    team/oej/02-labarea/configs/modules.conf.sample
    team/oej/02-labarea/configs/queues.conf.sample
    team/oej/02-labarea/configs/sip.conf.sample
    team/oej/02-labarea/configs/skinny.conf.sample
    team/oej/02-labarea/configs/zapata.conf.sample
    team/oej/02-labarea/configure
    team/oej/02-labarea/configure.ac
    team/oej/02-labarea/contrib/init.d/rc.mandrake.zaptel
    team/oej/02-labarea/db1-ast/Makefile
    team/oej/02-labarea/devicestate.c
    team/oej/02-labarea/dns.c
    team/oej/02-labarea/dnsmgr.c
    team/oej/02-labarea/doc/   (props changed)
    team/oej/02-labarea/doc/CODING-GUIDELINES
    team/oej/02-labarea/doc/asterisk-conf.txt
    team/oej/02-labarea/doc/enum.txt
    team/oej/02-labarea/doc/extconfig.txt
    team/oej/02-labarea/doc/misdn.txt
    team/oej/02-labarea/doc/realtime.txt
    team/oej/02-labarea/doc/speechrec.txt
    team/oej/02-labarea/doc/video.txt
    team/oej/02-labarea/dsp.c
    team/oej/02-labarea/enum.c
    team/oej/02-labarea/formats/Makefile
    team/oej/02-labarea/formats/format_h263.c
    team/oej/02-labarea/formats/format_ogg_vorbis.c
    team/oej/02-labarea/formats/format_wav_gsm.c
    team/oej/02-labarea/frame.c
    team/oej/02-labarea/funcs/Makefile
    team/oej/02-labarea/funcs/func_db.c
    team/oej/02-labarea/funcs/func_strings.c
    team/oej/02-labarea/http.c
    team/oej/02-labarea/include/asterisk/abstract_jb.h
    team/oej/02-labarea/include/asterisk/ael_structs.h
    team/oej/02-labarea/include/asterisk/app.h
    team/oej/02-labarea/include/asterisk/astosp.h
    team/oej/02-labarea/include/asterisk/autoconfig.h.in
    team/oej/02-labarea/include/asterisk/channel.h
    team/oej/02-labarea/include/asterisk/compiler.h
    team/oej/02-labarea/include/asterisk/config.h
    team/oej/02-labarea/include/asterisk/devicestate.h
    team/oej/02-labarea/include/asterisk/dns.h
    team/oej/02-labarea/include/asterisk/frame.h
    team/oej/02-labarea/include/asterisk/lock.h
    team/oej/02-labarea/include/asterisk/manager.h
    team/oej/02-labarea/include/asterisk/musiconhold.h
    team/oej/02-labarea/include/asterisk/options.h
    team/oej/02-labarea/include/asterisk/pbx.h
    team/oej/02-labarea/include/asterisk/rtp.h
    team/oej/02-labarea/include/asterisk/slinfactory.h
    team/oej/02-labarea/include/asterisk/speech.h
    team/oej/02-labarea/include/asterisk/translate.h
    team/oej/02-labarea/include/asterisk/utils.h
    team/oej/02-labarea/logger.c
    team/oej/02-labarea/makeopts.in
    team/oej/02-labarea/manager.c
    team/oej/02-labarea/netsock.c
    team/oej/02-labarea/pbx.c
    team/oej/02-labarea/pbx/Makefile
    team/oej/02-labarea/pbx/ael/ael-test/ref.ael-test3
    team/oej/02-labarea/pbx/ael/ael-test/ref.ael-test7
    team/oej/02-labarea/pbx/ael/ael-test/runtests
    team/oej/02-labarea/pbx/ael/ael.flex
    team/oej/02-labarea/pbx/ael/ael.tab.c
    team/oej/02-labarea/pbx/ael/ael.tab.h
    team/oej/02-labarea/pbx/ael/ael.y
    team/oej/02-labarea/pbx/ael/ael_lex.c
    team/oej/02-labarea/pbx/dundi-parser.c
    team/oej/02-labarea/pbx/pbx_ael.c
    team/oej/02-labarea/pbx/pbx_config.c
    team/oej/02-labarea/pbx/pbx_dundi.c
    team/oej/02-labarea/pbx/pbx_gtkconsole.c
    team/oej/02-labarea/pbx/pbx_kdeconsole.cc
    team/oej/02-labarea/plc.c
    team/oej/02-labarea/res/Makefile
    team/oej/02-labarea/res/res_adsi.c
    team/oej/02-labarea/res/res_agi.c
    team/oej/02-labarea/res/res_config_odbc.c
    team/oej/02-labarea/res/res_config_pgsql.c
    team/oej/02-labarea/res/res_features.c
    team/oej/02-labarea/res/res_jabber.c
    team/oej/02-labarea/res/res_monitor.c
    team/oej/02-labarea/res/res_musiconhold.c
    team/oej/02-labarea/res/res_snmp.c
    team/oej/02-labarea/res/res_speech.c
    team/oej/02-labarea/rtp.c
    team/oej/02-labarea/say.c
    team/oej/02-labarea/sched.c
    team/oej/02-labarea/sha1.c
    team/oej/02-labarea/slinfactory.c
    team/oej/02-labarea/sounds/Makefile
    team/oej/02-labarea/srv.c
    team/oej/02-labarea/tdd.c
    team/oej/02-labarea/translate.c
    team/oej/02-labarea/udptl.c
    team/oej/02-labarea/ulaw.c
    team/oej/02-labarea/utils.c
    team/oej/02-labarea/utils/Makefile
    team/oej/02-labarea/utils/smsq.c

Propchange: team/oej/02-labarea/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/02-labarea/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/oej/02-labarea/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/02-labarea/
------------------------------------------------------------------------------
--- svn:externals (added)
+++ svn:externals Mon Aug  7 12:37:45 2006
@@ -1,0 +1,2 @@
+menuselect	http://svn.digium.com/svn/menuselect/trunk
+mxml		http://svn.digium.com/svn/mxml/trunk

Propchange: team/oej/02-labarea/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Aug  7 12:37:45 2006
@@ -16,7 +16,9 @@
 testexpr2
 makeopts
 menuselect.makeopts
+menuselect.makedeps
 config.status
 config.log
 makeopts.xml
 autom4te.cache
+muted

Propchange: team/oej/02-labarea/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Aug  7 12:37:45 2006
@@ -1,1 +1,1 @@
-/trunk:1-35272
+/trunk:1-39191

Modified: team/oej/02-labarea/.cleancount
URL: http://svn.digium.com/view/asterisk/team/oej/02-labarea/.cleancount?rev=39193&r1=39192&r2=39193&view=diff
==============================================================================
--- team/oej/02-labarea/.cleancount (original)
+++ team/oej/02-labarea/.cleancount Mon Aug  7 12:37:45 2006
@@ -1,1 +1,1 @@
-19
+20

Modified: team/oej/02-labarea/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/02-labarea/Makefile?rev=39193&r1=39192&r2=39193&view=diff
==============================================================================
--- team/oej/02-labarea/Makefile (original)
+++ team/oej/02-labarea/Makefile Mon Aug  7 12:37:45 2006
@@ -11,9 +11,19 @@
 # the GNU General Public License
 #
 
+# All Makefiles use the following variables:
+#
+# LDFLAGS - linker flags (not libraries), used for all links
+# LIBS - additional libraries, at top-level for all links,
+#      on a single object just for that object
+# SOLINK - linker flags used only for creating shared objects (.so files),
+#      used for all .so links
+#
+
 .EXPORT_ALL_VARIABLES:
 
-.PHONY: sounds
+#Uncomment this to see all build commands instead of 'quiet' output
+#NOISY_BUILD=yes
 
 # Create OPTIONS variable
 OPTIONS=
@@ -27,14 +37,14 @@
 #SUB_PROC=xscale # or maverick
 
 ifeq ($(CROSS_COMPILE),)
-  OSARCH=$(shell uname -s)
-  PROC?=$(shell uname -m)
+  OSARCH:=$(shell uname -s)
+  PROC?:=$(shell uname -m)
 else
   OSARCH=$(CROSS_ARCH)
   PROC=$(CROSS_PROC)
 endif
 
-PWD=$(shell pwd)
+ASTTOPDIR:=$(shell pwd)
 
 # Remember the MAKELEVEL at the top
 MAKETOPLEVEL?=$(MAKELEVEL)
@@ -68,16 +78,16 @@
 # Define standard directories for various platforms
 # These apply if they are not redefined in asterisk.conf 
 ifeq ($(OSARCH),SunOS)
-  ASTETCDIR=/etc/opt/asterisk
+  ASTETCDIR=/var/etc/asterisk
   ASTLIBDIR=/opt/asterisk/lib
-  ASTVARLIBDIR=/var/opt/asterisk/lib
-  ASTSPOOLDIR=/var/opt/asterisk/spool
-  ASTLOGDIR=/var/opt/asterisk/log
-  ASTHEADERDIR=/opt/asterisk/usr/include/asterisk
-  ASTBINDIR=/opt/asterisk/usr/bin
-  ASTSBINDIR=/opt/asterisk/usr/sbin
-  ASTVARRUNDIR=/var/opt/asterisk/run
-  ASTMANDIR=/opt/asterisk/usr/share/man
+  ASTVARLIBDIR=/var/opt/asterisk
+  ASTSPOOLDIR=/var/spool/asterisk
+  ASTLOGDIR=/var/log/asterisk
+  ASTHEADERDIR=/opt/asterisk/include
+  ASTBINDIR=/opt/asterisk/bin
+  ASTSBINDIR=/opt/asterisk/sbin
+  ASTVARRUNDIR=/var/run/asterisk
+  ASTMANDIR=/opt/asterisk/man
 else
   ASTETCDIR=$(sysconfdir)/asterisk
   ASTLIBDIR=$(libdir)/asterisk
@@ -123,6 +133,7 @@
 
 ifneq ($(wildcard menuselect.makeopts),)
   include menuselect.makeopts
+  include menuselect.makedeps
 endif
 
 ifneq ($(wildcard makeopts),)
@@ -133,8 +144,17 @@
 MOD_SUBDIR_CFLAGS=-I../include -I..
 OTHER_SUBDIR_CFLAGS=-I../include -I..
 
-ifeq ($(findstring dont-optimize,$(MAKECMDGOALS)),)
-  ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
+ifeq ($(origin MENUSELECT_CFLAGS),undefined)
+  MENUSELECT_CFLAGS:=$(shell grep MENUSELECT_CFLAGS $(USER_MAKEOPTS) .)
+  ifeq ($(MENUSELECT_CFLAGS),)
+    MENUSELECT_CFLAGS:=$(shell grep MENUSELECT_CFLAGS $(GLOBAL_MAKEOPTS) .)
+  endif
+  ifneq ($(MENUSELECT_CFLAGS),)
+    MENUSELECT_CFLAGS:=$(shell echo $(MENUSELECT_CFLAGS) | cut -f2 -d'=')
+  endif
+endif
+
+ifeq ($(findstring dont-optimize,$(MAKECMDGOALS)),$(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)))
 # More GSM codec optimization
 # Uncomment to enable MMXTM optimizations for x86 architecture CPU's
 # which support MMX instructions.  This should be newer pentiums,
@@ -143,12 +163,6 @@
 
 # Tell gcc to optimize the code
 OPTIMIZE+=-O6
-  else
-    # Stack backtraces, while useful for debugging, are incompatible with optimizations
-    ifeq ($(OSARCH),Linux)
-      CFLAGS+=-DSTACK_BACKTRACES
-    endif
-  endif
 else
   # Stack backtraces, while useful for debugging, are incompatible with optimizations
   ifeq ($(OSARCH),Linux)
@@ -208,15 +222,14 @@
 endif
 
 ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
+ifneq ($(OPTIMIZE),)
 ASTCFLAGS+=$(OPTIMIZE)
+endif
 
 ifeq ($(AST_DEVMODE),yes)
   ASTCFLAGS+=-Werror -Wunused
 endif
 
-ifeq ($(shell gcc -v 2>&1 | grep 'gcc version' | cut -f3 -d' ' | cut -f1 -d.),4)
-ASTCFLAGS+=-Wno-pointer-sign
-endif
 ASTOBJ=-o asterisk
 
 ifeq ($(findstring BSD,$(OSARCH)),BSD)
@@ -234,10 +247,7 @@
 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
+  AST_LIBS+=$(shell if test  $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
 endif # FreeBSD
 
 ifeq ($(OSARCH),NetBSD)
@@ -249,7 +259,7 @@
 endif
 
 ifeq ($(OSARCH),SunOS)
-  ASTCFLAGS+=-Wcast-align -DSOLARIS -Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
+  ASTCFLAGS+=-Wcast-align -DSOLARIS -Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/opt/ssl/include -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
 endif
 
 LIBEDIT=editline/libedit.a
@@ -269,9 +279,16 @@
 
 ASTCFLAGS+=$(MALLOC_DEBUG)$(BUSYDETECT)$(OPTIONS)
 
-MOD_SUBDIRS=res channels pbx apps codecs formats cdr funcs
-OTHER_SUBDIRS=utils agi
+MOD_SUBDIRS:=res channels pbx apps codecs formats cdr funcs
+OTHER_SUBDIRS:=utils agi
 SUBDIRS:=$(MOD_SUBDIRS) $(OTHER_SUBDIRS)
+SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)
+SUBDIRS_CLEAN:=$(SUBDIRS:%=%-clean)
+SUBDIRS_CLEAN_DEPEND:=$(SUBDIRS:%=%-clean-depend)
+MOD_SUBDIRS_DEPEND:=$(MOD_SUBDIRS:%=%-depend)
+OTHER_SUBDIRS_DEPEND:=$(OTHER_SUBDIRS:%=%-depend)
+SUBDIRS_DEPEND:=$(MOD_SUBDIRS_DEPEND) $(OTHER_SUBDIRS_DEPEND)
+SUBDIRS_UNINSTALL:=$(SUBDIRS:%=%-uninstall)
 
 OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
 	translate.o file.o pbx.o cli.o md5.o term.o \
@@ -303,13 +320,13 @@
 endif
 
 ifeq ($(OSARCH),Linux)
-  LIBS+=-ldl -lpthread $(EDITLINE_LIBS) -lm -lresolv  #-lnjamd
+  AST_LIBS+=-ldl -lpthread $(EDITLINE_LIB) -lm -lresolv  #-lnjamd
 else
-  LIBS+=$(EDITLINE_LIBS) -lm
+  AST_LIBS+=$(EDITLINE_LIB) -lm
 endif
 
 ifeq ($(OSARCH),Darwin)
-  LIBS+=-lresolv
+  AST_LIBS+=-lresolv
   ASTCFLAGS+=-D__Darwin__
   AUDIO_LIBS=-framework CoreAudio
   ASTLINK=-Wl,-dynamic
@@ -324,26 +341,25 @@
   ASTLINK=-Wl,-E 
   SOLINK=-shared -Xlinker -x
   ifeq ($(findstring BSD,$(OSARCH)),BSD)
-    SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
+    LDFLAGS+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
   endif
 endif
 
 ifeq ($(OSARCH),FreeBSD)
-  LIBS+=-lcrypto
+  AST_LIBS+=-lcrypto
 endif
 
 ifeq ($(OSARCH),NetBSD)
-  LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIBS)
+  AST_LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIB)
 endif
 
 ifeq ($(OSARCH),OpenBSD)
-  LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIBS)
+  AST_LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB)
 endif
 
 ifeq ($(OSARCH),SunOS)
-  LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
+  AST_LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/opt/ssl/lib -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
   OBJS+=strcompat.o
-  MENUSELECT_OBJS+=strcompat.o
   ASTLINK=
   SOLINK=-shared -fpic -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
 endif
@@ -359,6 +375,8 @@
   HAVEDOT=no
 endif
 
+include Makefile.rules
+
 _all: all
 	@echo " +--------- Asterisk Build Complete ---------+"  
 	@echo " + Asterisk has successfully been built, but +"  
@@ -368,7 +386,13 @@
 	@echo " +               make install                +"  
 	@echo " +-------------------------------------------+"  
 
-all: cleantest config.status menuselect.makeopts depend asterisk subdirs
+all: cleantest config.status menuselect.makeopts depend $(SUBDIRS) asterisk
+
+$(MOD_SUBDIRS):
+	@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
+
+$(OTHER_SUBDIRS):
+	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
 
 config.status: configure
 	@CFLAGS="" ./configure
@@ -386,8 +410,8 @@
 	@echo "****"
 	@exit 1
 
-menuselect.makeopts: build_tools/menuselect makeopts.xml
-	@build_tools/menuselect --check-deps ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} $@
+menuselect.makeopts menuselect.makedeps: menuselect/menuselect makeopts.xml
+	menuselect/menuselect --check-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts
 
 #ifneq ($(wildcard tags),)
 ctags: tags
@@ -398,10 +422,10 @@
 endif
 
 editline/config.h:
-	cd editline && unset CFLAGS LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \
+	cd editline && unset CFLAGS AST_LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \
 
 editline/libedit.a:
-	cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure
+	cd editline && unset CFLAGS AST_LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure
 	$(MAKE) -C editline libedit.a
 
 db1-ast/libdb1.a:
@@ -468,48 +492,54 @@
 	fi
 	@rm -f $@.tmp
 
+channel.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 \
+	@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 \
 		mv include/asterisk/build.h.tmp include/asterisk/build.h ; \
 	fi
-	rm -f include/asterisk/build.h.tmp
-	$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
-	$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(LIBS)
+	@rm -f include/asterisk/build.h.tmp
+	@$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
+	@echo "   [LD] $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.1 $(AST_LIBS) -> $@"
+	@$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(AST_LIBS)
 
 muted: muted.o
-	$(CC) $(AUDIO_LIBS) -o muted muted.o
-
-subdirs: 
-	@for x in $(MOD_SUBDIRS); do CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x || exit 1 ; done
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C utils
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C agi
-
-clean-depend:
-	@for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done
-	rm -f .depend .tags-depend
-
-clean: clean-depend
-	@for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
+muted: LIBS+=$(AUDIO_LIBS)
+
+$(SUBDIRS_CLEAN_DEPEND):
+	@$(MAKE) -C $(@:-clean-depend=) clean-depend
+
+$(SUBDIRS_CLEAN):
+	@$(MAKE) -C $(@:-clean=) clean
+
+clean-depend: $(SUBDIRS_CLEAN_DEPEND)
+
+clean: $(SUBDIRS_CLEAN) clean-depend
 	rm -f *.o *.so asterisk
 	rm -f defaults.h
 	rm -f include/asterisk/build.h
 	rm -f include/asterisk/version.h
 	rm -f .tags-sources tags TAGS
+	rm -f .depend .tags-depend
 	@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
-	$(MAKE) -C db1-ast clean
-	$(MAKE) -C stdtime clean
-
-distclean: dist-clean
-
-dist-clean: clean
-	$(MAKE) -C mxml clean
-	$(MAKE) -C build_tools dist-clean
-	$(MAKE) -C sounds dist-clean
-	rm -f menuselect.makeopts makeopts makeopts.xml
+	@$(MAKE) -C db1-ast clean
+	@$(MAKE) -C stdtime clean
+	@$(MAKE) -C menuselect clean
+
+dist-clean: distclean
+
+distclean: clean
+	@$(MAKE) -C mxml clean
+	@$(MAKE) -C menuselect dist-clean
+	@$(MAKE) -C sounds dist-clean
+	rm -f menuselect.makeopts makeopts makeopts.xml menuselect.makedeps
 	rm -f config.log config.status
-	rm -f include/autoconfig.h
+	rm -rf autom4te.cache
+	rm -f include/asterisk/autoconfig.h
 	rm -f include/asterisk/buildopts.h
+	rm -rf doc/api
+	rm -f build_tools/menuselect-deps
 
 datafiles: all
 	if [ x`$(ID) -un` = xroot ]; then sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
@@ -559,7 +589,7 @@
 	mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor
 	if [ -f asterisk ]; then $(INSTALL) -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/; fi
 	if [ -f asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi
-	ln -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
+	$(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
 	$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
 	$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
 	if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
@@ -586,8 +616,8 @@
 	$(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
 	$(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin; \
 
-install-subdirs:
-	@for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
+$(SUBDIRS_INSTALL):
+	@$(MAKE) -C $(@:-install=) install
 
 NEWMODS=$(notdir $(wildcard */*.so))
 OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
@@ -610,7 +640,7 @@
 		echo " WARNING WARNING WARNING" ;\
 	fi
 
-install: all datafiles bininstall install-subdirs
+install: all datafiles bininstall $(SUBDIRS_INSTALL)
 	@if [ -x /usr/sbin/asterisk-post-install ]; then \
 		/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
 	fi
@@ -643,26 +673,26 @@
 	mkdir -p $(DESTDIR)$(ASTETCDIR)
 	for x in configs/*.adsi; do \
 		if [ ! -f $(DESTDIR)$(ASTETCDIR)/$$x ]; then \
-			$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x` ; \
+			$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x` ; \
 		fi ; \
 	done
 
 samples: adsi
 	mkdir -p $(DESTDIR)$(ASTETCDIR)
 	for x in configs/*.sample; do \
-		if [ -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ]; then \
+		if [ -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ]; then \
 			if [ "$(OVERWRITE)" = "y" ]; then \
-				if cmp -s $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $$x ; then \
+				if cmp -s $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` $$x ; then \
 					echo "Config file $$x is unchanged"; \
 					continue; \
 				fi ; \
-				mv -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample`.old ; \
+				mv -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`.old ; \
 			else \
 				echo "Skipping config file $$x"; \
 				continue; \
 			fi ;\
 		fi ; \
-		$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ;\
+		$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ;\
 	done
 	if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \
 		( \
@@ -772,29 +802,33 @@
 
 valgrind: dont-optimize
 
-depend: include/asterisk/version.h include/asterisk/buildopts.h .depend defaults.h 
-	@for x in $(MOD_SUBDIRS); do CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x depend || exit 1 ; done
-	@for x in $(OTHER_SUBDIRS); do CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x depend || exit 1 ; done
+$(MOD_SUBDIRS_DEPEND):
+	@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $(@:-depend=) depend
+
+$(OTHER_SUBDIRS_DEPEND):
+	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $(@:-depend=) depend
+
+depend: include/asterisk/version.h include/asterisk/buildopts.h .depend defaults.h $(SUBDIRS_DEPEND)
 
 .depend: include/asterisk/version.h include/asterisk/buildopts.h defaults.h
 	build_tools/mkdep $(CFLAGS) $(wildcard *.c)
 
 .tags-depend:
 	@echo -n ".tags-depend: " > $@
-	@find . -maxdepth 1 -name \*.c -printf "\t%p \\\\\n" >> $@
-	@find . -maxdepth 1 -name \*.h -printf "\t%p \\\\\n" >> $@
-	@find $(SUBDIRS) -name \*.c -printf "\t%p \\\\\n" >> $@
-	@find $(SUBDIRS) -name \*.h -printf "\t%p \\\\\n" >> $@
-	@find include -name \*.h -printf "\t%p \\\\\n" >> $@
+	@$(FIND) . -maxdepth 1 -name \*.c -printf "\t%p \\\\\n" >> $@
+	@$(FIND) . -maxdepth 1 -name \*.h -printf "\t%p \\\\\n" >> $@
+	@$(FIND) $(SUBDIRS) -name \*.c -printf "\t%p \\\\\n" >> $@
+	@$(FIND) $(SUBDIRS) -name \*.h -printf "\t%p \\\\\n" >> $@
+	@$(FIND) include -name \*.h -printf "\t%p \\\\\n" >> $@
 	@echo >> $@
 
 .tags-sources:
 	@rm -f $@
-	@find . -maxdepth 1 -name \*.c -print >> $@
-	@find . -maxdepth 1 -name \*.h -print >> $@
-	@find $(SUBDIRS) -name \*.c -print >> $@
-	@find $(SUBDIRS) -name \*.h -print >> $@
-	@find include -name \*.h -print >> $@
+	@$(FIND) . -maxdepth 1 -name \*.c -print >> $@
+	@$(FIND) . -maxdepth 1 -name \*.h -print >> $@
+	@$(FIND) $(SUBDIRS) -name \*.c -print >> $@
+	@$(FIND) $(SUBDIRS) -name \*.h -print >> $@
+	@$(FIND) include -name \*.h -print >> $@
 
 tags: .tags-depend .tags-sources
 	ctags -L .tags-sources -o $@
@@ -805,8 +839,6 @@
 	etags -o $@ `cat .tags-sources`
 
 etags: TAGS
-
-FORCE:
 
 %_env:
 	$(MAKE) -C $(shell echo $@ | sed "s/_env//g") env
@@ -827,7 +859,10 @@
 		$(MAKE) defaults.h;\
 	fi
 
-_uninstall:
+$(SUBDIRS_UNINSTALL):
+	@$(MAKE) -C $(@:-uninstall=) uninstall
+
+_uninstall: $(SUBDIRS_UNINSTALL)
 	rm -f $(DESTDIR)$(MODULES_DIR)/*
 	rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
 	rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
@@ -835,7 +870,6 @@
 	rm -rf $(DESTDIR)$(ASTHEADERDIR)
 	rm -rf $(DESTDIR)$(ASTDATADIR)/firmware
 	rm -rf $(DESTDIR)$(ASTMANDIR)/man8
-	for x in $(SUBDIRS); do $(MAKE) -C $$x uninstall || exit 1 ; done
 	$(MAKE) -C sounds uninstall
 
 uninstall: _uninstall
@@ -860,16 +894,18 @@
 	rm -rf $(DESTDIR)$(ASTETCDIR)
 	rm -rf $(DESTDIR)$(ASTLOGDIR)
 
-menuselect: build_tools/menuselect makeopts.xml
-	- at build_tools/menuselect ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
-
-build_tools/menuselect: build_tools/menuselect.c build_tools/menuselect_curses.c build_tools/menuselect.h config.status mxml/libmxml.a $(MENUSELECT_OBJS)
-	$(MAKE) -C build_tools menuselect
+menuselect: menuselect/menuselect makeopts.xml
+	- at menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
+
+menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h config.status mxml/libmxml.a
+	@CFLAGS="-include $(ASTTOPDIR)/include/asterisk/autoconfig.h -I$(ASTTOPDIR)/include" PARENTSRC="$(ASTTOPDIR)" $(MAKE) -C menuselect menuselect
 
 mxml/libmxml.a:
-	@cd mxml && unset CFLAGS LIBS && test -f config.h || ./configure
+	@cd mxml && unset CFLAGS AST_LIBS && test -f config.h || ./configure
 	$(MAKE) -C mxml libmxml.a
 
-makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(dir)/*.c) build_tools/cflags.xml sounds/sounds.xml
+makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml
 	@echo "Generating list of available modules ..."
 	@build_tools/prep_moduledeps > $@
+
+.PHONY: menuselect sounds clean clean-depend dist-clean distclean all _all depend cleantest uninstall _uninstall uninstall-all dont-optimize valgrind $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_CLEAN_DEPEND) $(SUBDIRS_DEPEND) $(SUBDIRS_UNINSTALL) $(SUBDIRS)

Modified: team/oej/02-labarea/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/02-labarea/UPGRADE.txt?rev=39193&r1=39192&r2=39193&view=diff
==============================================================================
--- team/oej/02-labarea/UPGRADE.txt (original)
+++ team/oej/02-labarea/UPGRADE.txt Mon Aug  7 12:37:45 2006
@@ -285,6 +285,23 @@
 * Support for MFC/R2 has been removed, as it has not been functional for some
   time and it has no maintainer.
 
+The G726-32 codec:
+
+* It has been determined that previous versions of Asterisk used the wrong codeword
+  packing order for G726-32 data. This version supports both available packing orders,
+  and can transcode between them. It also now selects the proper order when
+  negotiating with a SIP peer based on the codec name supplied in the SDP. However,
+  there are existing devices that improperly request one order and then use another;
+  Sipura and Grandstream ATAs are known to do this, and there may be others. To
+  be able to continue to use these devices with this version of Asterisk and the
+  G726-32 codec, a configuration parameter called 'g726nonstandard' has been added
+  to sip.conf, so that Asterisk can use the packing order expected by the device (even
+  though it requested a different order). In addition, the internal format number for
+  G726-32 has been changed, and the old number is now assigned to AAL2-G726-32. The
+  result of this is that this version of Asterisk will be able to interoperate over
+  IAX2 with older versions of Asterisk, as long as this version is told to allow
+  'g726aal2' instead of 'g726' as the codec for the call.
+
 Installation:
 
 * On BSD systems, the installation directories have changed to more "FreeBSDish"
@@ -298,3 +315,42 @@
 	ASTETCDIR	/usr/local/etc/asterisk
 	ASTBINDIR	/usr/local/bin/asterisk
 	ASTSBINDIR	/usr/local/sbin/asterisk
+
+Music on Hold:
+
+* The music on hold handling has been changed in some significant ways in hopes
+  to make it work in a way that is much less confusing to users. Behavior will
+  not change if the same configuration is used from older versions of Asterisk.
+  However, there are some new configuration options that will make things work
+  in a way that makes more sense.
+
+  Previously, many of the channel drivers had an option called "musicclass" or
+  something similar. This option set what music on hold class this channel
+  would *hear* when put on hold. Some people expected (with good reason) that
+  this option was to configure what music on hold class to play when putting
+  the bridged channel on hold. This option has now been deprecated.
+
+  Two new music on hold related configuration options for channel drivers have
+  been introduced. Some channel drivers support both options, some just one,
+  and some support neither of them. Check the sample configuration files to see
+  which options apply to which channel driver.
+
+  The "mohsuggest" option specifies which music on hold class to suggest to the
+  bridged channel when putting them on hold. The only way that this class can
+  be overridden is if the bridged channel has a specific music class set that
+  was done in the dialplan using Set(CHANNEL(musicclass)=something).
+
+  The "mohinterpret" option is similar to the old "musicclass" option. It
+  specifies which music on hold class this channel would like to listen to when
+  put on hold. This music class is only effective if this channel has no music
+  class set on it from the dialplan and the bridged channel putting this one on
+  hold had no "mohsuggest" setting.
+
+  The IAX2 and Zap channel drivers have an additional feature for the
+  "mohinterpret" option. If this option is set to "passthrough", then these
+  channel drivers will pass through the HOLD message in signalling instead of
+  starting music on hold on the channel. An example for how this would be
+  useful is in an enterprise network of Asterisk servers. When one phone on one
+  server puts a phone on a different server on hold, the remote server will be
+  responsibile for playing the hold music to its local phone that was put on
+  hold instead of the far end server across the network playing the music.

Modified: team/oej/02-labarea/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/oej/02-labarea/acinclude.m4?rev=39193&r1=39192&r2=39193&view=diff
==============================================================================
--- team/oej/02-labarea/acinclude.m4 (original)
+++ team/oej/02-labarea/acinclude.m4 Mon Aug  7 12:37:45 2006
@@ -1,73 +1,83 @@
-# AST_EXT_LIB([NAME], [FUNCTION], [package header], [package symbol name], [package friendly name], [additional LIB data])
+# AST_EXT_LIB_SETUP([package symbol name], [package friendly name], [package option name], [additional help text])
 
-AC_DEFUN([AST_EXT_LIB],
+AC_DEFUN([AST_EXT_LIB_SETUP],
 [
-AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=PATH],[use $5 files in PATH]),[
+$1_DESCRIP="$2"
+$1_OPTION="$3"
+AC_ARG_WITH([$3], AC_HELP_STRING([--with-$3=PATH],[use $2 files in PATH $4]),[
 case ${withval} in
      n|no)
-     USE_$4=no
+     USE_$1=no
      ;;
      y|ye|yes)
-     $4_MANDATORY="yes"
+     $1_MANDATORY="yes"
      ;;
      *)
-     $4_DIR="${withval}"
-     $4_MANDATORY="yes"
+     $1_DIR="${withval}"
+     $1_MANDATORY="yes"
      ;;
 esac
 ])
+PBX_$1=0
+AC_SUBST([$1_LIB])
+AC_SUBST([$1_INCLUDE])
+AC_SUBST([PBX_$1])
+])
 
-PBX_LIB$4=0
+# AST_EXT_LIB_CHECK([package symbol name], [package library name], [function to check], [package header], [additional LIB data])
 
-if test "${USE_$4}" != "no"; then
+AC_DEFUN([AST_EXT_LIB_CHECK],
+[
+if test "${USE_$1}" != "no"; then
    pbxlibdir=""
-   if test "x${$4_DIR}" != "x"; then
-      pbxlibdir="-L${$1_DIR}/lib"
+   if test "x${$1_DIR}" != "x"; then
+      if test -d ${$1_DIR}/lib; then
+      	 pbxlibdir="-L${$1_DIR}/lib"
+      else
+      	 pbxlibdir="-L${$1_DIR}"
+      fi
    fi
-   AC_CHECK_LIB([$1], [$2], [AST_$4_FOUND=yes], [AST_$4_FOUND=no], ${pbxlibdir} $6)
+   AC_CHECK_LIB([$2], [$3], [AST_$1_FOUND=yes], [AST_$1_FOUND=no], ${pbxlibdir} $5)
 
-   if test "${AST_$4_FOUND}" = "yes"; then
-      $4_LIB="-l$1 $6"
-      $4_HEADER_FOUND="1"
-      if test "x${$4_DIR}" != "x"; then
-         $4_LIB="${pbxlibdir} ${$4_LIB}"
-	 $4_INCLUDE="-I${$4_DIR}/include"
-	 if test "x$3" != "x" ; then
-	    AC_CHECK_HEADER([${$4_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
+   if test "${AST_$1_FOUND}" = "yes"; then
+      $1_LIB="-l$2 $5"
+      $1_HEADER_FOUND="1"
+      if test "x${$1_DIR}" != "x"; then
+         $1_LIB="${pbxlibdir} ${$1_LIB}"
+	 $1_INCLUDE="-I${$1_DIR}/include"
+	 if test "x$4" != "x" ; then
+	    AC_CHECK_HEADER([${$1_DIR}/include/$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
 	 fi
       else
-	 if test "x$3" != "x" ; then
-            AC_CHECK_HEADER([$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
+	 if test "x$4" != "x" ; then
+            AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
 	 fi
       fi
-      if test "x${$4_HEADER_FOUND}" = "x0" ; then
-         if test ! -z "${$4_MANDATORY}" ;
+      if test "x${$1_HEADER_FOUND}" = "x0" ; then
+         if test ! -z "${$1_MANDATORY}" ;
          then
             echo " ***"
-            echo " *** It appears that you do not have the $1 development package installed."
-            echo " *** Please install it to include $5 support, or re-run configure"
-            echo " *** without explicitly specifying --with-$1"
+            echo " *** It appears that you do not have the $2 development package installed."
+            echo " *** Please install it to include ${$1_DESCRIP} support, or re-run configure"
+            echo " *** without explicitly specifying --with-${$1_OPTION}"
             exit 1
          fi
-         $4_LIB=""
-         $4_INCLUDE=""
-         PBX_LIB$4=0
+         $1_LIB=""
+         $1_INCLUDE=""
+         PBX_$1=0
       else
-         PBX_LIB$4=1
-         AC_DEFINE_UNQUOTED([HAVE_$4], 1, [Define to indicate the $5 library])
+         PBX_$1=1
+         AC_DEFINE_UNQUOTED([HAVE_$1], 1, [Define to indicate the ${$1_DESCRIP} library])
       fi
-   elif test ! -z "${$4_MANDATORY}";
+   elif test ! -z "${$1_MANDATORY}";
    then
       echo "***"
-      echo "*** The $5 installation on this system appears to be broken."
+      echo "*** The ${$1_DESCRIP} installation on this system appears to be broken."
       echo "*** Either correct the installation, or run configure"
-      echo "*** without explicity specifying --with-$1"
+      echo "*** without explicitly specifying --with-${$1_OPTION}"
       exit 1
    fi
 fi
-AC_SUBST([$4_LIB])

[... 67439 lines stripped ...]


More information about the svn-commits mailing list