help
Voicemail related modules for Asterisk
+config BR2_PACKAGE_ASTERISK_MINI
+ prompt "asterisk-mini - Minimal open source PBX"
+ tristate
+ default m if CONFIG_DEVEL
+ depends BR2_PACKAGE_ASTERISK
+ help
+ Asterisk is a complete PBX in software. It provides all of the features
+ you would expect from a PBX and more. Asterisk does voice over IP in three
+ protocols, and can interoperate with almost all standards-based telephony
+ equipment using relatively inexpensive hardware.
+
+ http://www.asterisk.org/
+
+ This package contains only the following modules:
+ - chan_iax2
+ - chan_local
+ - chan_sip
+ - codec_gsm
+ - codec_ulaw
+ - format_gsm
+ - format_pcm
+ - format_wav
+ - format_wav_gsm
+ - pbx_config
+ - res_features
+ - res_musiconhold
+
endmenu
include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk
-PKG_VERSION:=1.0.7
-PKG_RELEASE:=4
-PKG_MD5SUM:=4cc3c1e4a1b12e0e4c748326ad153291
+PKG_VERSION:=1.0.10
+PKG_RELEASE:=1
+PKG_MD5SUM:=f60f4c4edc36fa61dc55a5385fd82e71
-PKG_SOURCE_URL:=http://ftp.digium.com/pub/asterisk/old-releases
+PKG_SOURCE_URL:=http://ftp.digium.com/pub/asterisk/ ftp://ftp.digium.com/pub/asterisk/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_CAT:=zcat
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,ASTERISK,asterisk,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,ASTERISK_MINI,asterisk-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,ASTERISK_MYSQL,asterisk-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,ASTERISK_PGSQL,asterisk-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,ASTERISK_VOICEMAIL,asterisk-voicemail,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
EXTRA_APPS="$(APPS)" \
EXTRA_MODS="$(MODS)" \
MODSPEEX="$(SPEEX)"
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ install samples
+ rm -f $(PKG_INSTALL_DIR)/etc/asterisk/*.old
touch $@
$(IPKG_ASTERISK):
- $(MAKE) -C $(PKG_BUILD_DIR) \
- DESTDIR="$(IDIR_ASTERISK)" \
- install samples
+ cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_ASTERISK)
rm -rf $(IDIR_ASTERISK)/usr/sbin/astgenkey
rm -rf $(IDIR_ASTERISK)/usr/bin
rm -rf $(IDIR_ASTERISK)/usr/share
rm -f dundi.conf ; \
)
$(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(IDIR_ASTERISK)/etc/asterisk/musiconhold.conf
- rm -f $(IDIR_ASTERISK)/etc/asterisk/*.old
+ install -m0644 ./files/modules.conf $(IDIR_ASTERISK)/etc/asterisk/
install -d -m0755 $(IDIR_ASTERISK)/etc/default
install -m0644 ./files/asterisk.default $(IDIR_ASTERISK)/etc/default/asterisk
install -d -m0755 $(IDIR_ASTERISK)/etc/init.d
$(RSTRIP) $(IDIR_ASTERISK)
$(IPKG_BUILD) $(IDIR_ASTERISK) $(PACKAGE_DIR)
+$(IPKG_ASTERISK_MINI):
+ install -d -m0755 $(IDIR_ASTERISK_MINI)/etc/asterisk
+ for f in asterisk enum extconfig extensions features iax iaxprov logger manager modules musiconhold rtp sip; do \
+ cp -fpR $(PKG_INSTALL_DIR)/etc/asterisk/$$f.conf $(IDIR_ASTERISK_MINI)/etc/asterisk/ ; \
+ done
+ install -m0644 ./files/modules.conf $(IDIR_ASTERISK)/etc/asterisk/
+ $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf
+ install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk
+ cp -fpR $(PKG_INSTALL_DIR)/usr/lib/asterisk/firmware $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/
+ install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/keys
+ install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/modules
+ for f in chan_iax2 chan_local chan_sip codec_gsm codec_ulaw format_gsm format_pcm format_wav \
+ format_wav_gsm pbx_config res_features res_musiconhold; do \
+ cp -fpR $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$f.so $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/modules/ ; \
+ done
+ install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/mohmp3
+ install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/sounds
+ install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/sbin
+ cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(IDIR_ASTERISK_MINI)/usr/sbin/
+ cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/safe_asterisk $(IDIR_ASTERISK_MINI)/usr/sbin/
+ install -d -m0755 $(IDIR_ASTERISK_MINI)/etc/default
+ install -m0644 ./files/asterisk.default $(IDIR_ASTERISK_MINI)/etc/default/asterisk
+ install -d -m0755 $(IDIR_ASTERISK_MINI)/etc/init.d
+ install -m0755 ./files/asterisk.init $(IDIR_ASTERISK_MINI)/etc/init.d/asterisk
+ ln -sf asterisk $(IDIR_ASTERISK_MINI)/etc/init.d/S60asterisk
+ $(RSTRIP) $(IDIR_ASTERISK_MINI)
+ $(IPKG_BUILD) $(IDIR_ASTERISK_MINI) $(PACKAGE_DIR)
+
$(IPKG_ASTERISK_MYSQL):
install -d -m0755 $(IDIR_ASTERISK_MYSQL)/etc/asterisk
install -m0600 $(PKG_BUILD_DIR)/configs/cdr_mysql.conf.sample $(IDIR_ASTERISK_MYSQL)/etc/asterisk/cdr_mysql.conf
$(IPKG_BUILD) $(IDIR_ASTERISK_PBX_DUNDI) $(PACKAGE_DIR)
$(IPKG_ASTERISK_RES_AGI):
+ install -d -m0755 $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/agi-bin
install -d -m0755 $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/modules
install -m0755 $(PKG_BUILD_DIR)/res/res_agi.so $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/modules/
$(RSTRIP) $(IDIR_ASTERISK_RES_AGI)
--- /dev/null
+;
+; Asterisk configuration file
+;
+; Module Loader configuration file
+;
+
+[modules]
+autoload=yes
+;
+; load => res_features.so ; Call Parking Resource
+noload => res_indications.so ; Indications Configuration
+noload => res_monitor.so ; Call Monitoring Resource
+; load => res_musiconhold.so ; Music On Hold Resource
+noload => cdr_csv.so ; Comma Separated Values CDR Backend
+noload => cdr_manager.so ; Asterisk Call Manager CDR Backend
+noload => chan_agent.so ; Agent Proxy Channel
+; load => chan_iax2.so ; Inter Asterisk eXchange (Ver 2)
+; load => chan_local.so ; Local Proxy Channel
+; load => chan_sip.so ; Session Initiation Protocol (SIP)
+noload => codec_a_mu.so ; A-law and Mulaw direct Coder/Decoder
+noload => codec_adpcm.so ; Adaptive Differential PCM Coder/Decoder
+noload => codec_alaw.so ; A-law Coder/Decoder
+noload => codec_g726.so ; ITU G.726-32kbps G726 Transcoder
+; load => codec_gsm.so ; GSM/PCM16 (signed linear) Codec Translat
+; load => codec_ulaw.so ; Mu-law Coder/Decoder
+noload => format_g726.so ; Raw G.726 (16/24/32/40kbps) data
+noload => format_g729.so ; Raw G729 data
+; load => format_gsm.so ; Raw GSM data
+noload => format_h263.so ; Raw h263 data
+noload => format_jpeg.so ; JPEG (Joint Picture Experts Group) Image
+; load => format_pcm.so ; Raw uLaw 8khz Audio support (PCM)
+noload => format_pcm_alaw.so ; Raw aLaw 8khz PCM Audio support
+noload => format_sln.so ; Raw Signed Linear Audio support (SLN)
+noload => format_vox.so ; Dialogic VOX (ADPCM) File Format
+; load => format_wav.so ; Microsoft WAV format (8000hz Signed Line
+; load => format_wav_gsm.so ; Microsoft WAV format (Proprietary GSM)
+noload => app_alarmreceiver.so ; Alarm Receiver for Asterisk
+noload => app_authenticate.so ; Authentication Application
+noload => app_cdr.so ; Make sure asterisk doesn't save CDR for
+noload => app_chanisavail.so ; Check if channel is available
+noload => app_controlplayback.so ; Control Playback Application
+noload => app_cut.so ; Cuts up variables
+noload => app_db.so ; Database access functions for Asterisk e
+; load => app_dial.so ; Dialing Application
+noload => app_directory.so ; Extension Directory
+noload => app_disa.so ; DISA (Direct Inward System Access) Appli
+; load => app_echo.so ; Simple Echo Application
+noload => app_enumlookup.so ; ENUM Lookup
+noload => app_eval.so ; Reevaluates strings
+noload => app_exec.so ; Executes applications
+noload => app_forkcdr.so ; Fork The CDR into 2 seperate entities.
+noload => app_getcpeid.so ; Get ADSI CPE ID
+noload => app_groupcount.so ; Group Management Routines
+noload => app_ices.so ; Encode and Stream via icecast and ices
+noload => app_image.so ; Image Transmission Application
+noload => app_lookupblacklist.so ; Look up Caller*ID name/number from black
+noload => app_lookupcidname.so ; Look up CallerID Name from local databas
+; load => app_macro.so ; Extension Macros
+; load => app_milliwatt.so ; Digital Milliwatt (mu-law) Test Applicat
+noload => app_parkandannounce.so ; Call Parking and Announce Application
+; load => app_playback.so ; Trivial Playback Application
+noload => app_privacy.so ; Require phone number to be entered, if n
+noload => app_qcall.so ; Call from Queue
+noload => app_queue.so ; True Call Queueing
+noload => app_random.so ; Random goto
+noload => app_read.so ; Read Variable Application
+noload => app_record.so ; Trivial Record Application
+; load => app_sayunixtime.so ; Say time
+noload => app_senddtmf.so ; Send DTMF digits Application
+noload => app_sendtext.so ; Send Text Applications
+noload => app_setcallerid.so ; Set CallerID Application
+noload => app_setcdruserfield.so ; CDR user field apps
+noload => app_setcidname.so ; Set CallerID Name
+noload => app_setcidnum.so ; Set CallerID Number
+noload => app_sms.so ; SMS/PSTN handler
+noload => app_softhangup.so ; Hangs up the requested channel
+noload => app_striplsd.so ; Strip trailing digits
+noload => app_substring.so ; (Deprecated) Save substring digits in a
+noload => app_system.so ; Generic System() application
+noload => app_talkdetect.so ; Playback with Talk Detection
+noload => app_test.so ; Interface Test Application
+noload => app_transfer.so ; Transfer
+noload => app_txtcidname.so ; TXTCIDName
+noload => app_url.so ; Send URL Applications
+noload => app_userevent.so ; Custom User Event Application
+; load => app_verbose.so ; Send verbose output
+noload => app_waitforring.so ; Waits until first ring after time
+; load => pbx_config.so ; Text Extension Configuration
+noload => pbx_spool.so ; Outgoing Spool Support
+noload => pbx_wilcalu.so ; Wil Cal U (Auto Dialer)
+
+;
+; Module names listed in "global" section will have symbols globally
+; exported to modules loaded after them.
+;
+[global]
+chan_modem.so=no
--- /dev/null
+/etc/asterisk/asterisk.conf
+/etc/asterisk/enum.conf
+/etc/asterisk/extconfig.conf
+/etc/asterisk/extensions.conf
+/etc/asterisk/features.conf
+/etc/asterisk/iax.conf
+/etc/asterisk/iaxprov.conf
+/etc/asterisk/logger.conf
+/etc/asterisk/manager.conf
+/etc/asterisk/modules.conf
+/etc/asterisk/musiconhold.conf
+/etc/asterisk/rtp.conf
+/etc/asterisk/sip.conf
--- /dev/null
+Package: asterisk-mini
+Priority: optional
+Section: net
+Depends: libncurses, libpthread
+Description: A minimal open source PBX
--- /dev/null
+/etc/asterisk/asterisk.conf
+/etc/asterisk/agents.conf
+/etc/asterisk/alarmreceiver.conf
+/etc/asterisk/cdr_manager.conf
+/etc/asterisk/enum.conf
+/etc/asterisk/extconfig.conf
+/etc/asterisk/extensions.conf
+/etc/asterisk/features.conf
+/etc/asterisk/iax.conf
+/etc/asterisk/iaxprov.conf
+/etc/asterisk/indications.conf
+/etc/asterisk/logger.conf
+/etc/asterisk/manager.conf
+/etc/asterisk/modules.conf
+/etc/asterisk/musiconhold.conf
+/etc/asterisk/osp.conf
+/etc/asterisk/privacy.conf
+/etc/asterisk/queues.conf
+/etc/asterisk/rtp.conf
+/etc/asterisk/sip.conf
--- /dev/null
+diff -ruN asterisk-1.0.7-old/apps/Makefile asterisk-1.0.7-new/apps/Makefile
+--- asterisk-1.0.7-old/apps/Makefile 2004-09-24 23:32:56.000000000 +0200
++++ asterisk-1.0.7-new/apps/Makefile 2005-03-19 17:38:06.000000000 +0100
+@@ -35,13 +35,14 @@
+ APPS+=app_intercom.so
+ endif
+
+-#APPS+=app_sql_postgres.so
++# add extra apps
++APPS+=$(EXTRA_APPS)
+ #APPS+=app_sql_odbc.so
+ #APPS+=app_rpt.so
+
+-APPS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
+-APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
+-APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
++#APPS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
++#APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
++#APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
+
+ CFLAGS+=-fPIC
+
--- /dev/null
+diff -ruN asterisk-1.0.7-old/db1-ast/Makefile asterisk-1.0.7-new/db1-ast/Makefile
+--- asterisk-1.0.7-old/db1-ast/Makefile 2004-08-31 18:33:00.000000000 +0200
++++ asterisk-1.0.7-new/db1-ast/Makefile 2005-03-19 17:38:06.000000000 +0100
+@@ -32,8 +32,8 @@
+
+ $(LIBDB): $(OBJS)
+ rm -f $@
+- ar cq $@ $(OBJS)
+- ranlib $@
++ $(AR) cq $@ $(OBJS)
++ $(RANLIB) $@
+
+ $(LIBDBSO): $(SHOBJS)
+ $(CC) -Wl,-O1 -Wl,--version-script=libdb.map -Wl,-soname=$(LIBDBSO) -shared -o $@ $^
--- /dev/null
+diff -ruN asterisk-1.0.7-old/cdr/Makefile asterisk-1.0.7-new/cdr/Makefile
+--- asterisk-1.0.7-old/cdr/Makefile 2004-08-31 18:33:00.000000000 +0200
++++ asterisk-1.0.7-new/cdr/Makefile 2005-03-19 17:38:06.000000000 +0100
+@@ -12,7 +12,7 @@
+ #
+
+ #ADD cdr_pgsql.so to MODS= to include PostgreSQL support: REQUIRES PostgreSQL libs
+-MODS=cdr_csv.so cdr_manager.so
++MODS=cdr_csv.so cdr_manager.so $(EXTRA_MODS)
+
+
+ CFLAGS+=-fPIC
--- /dev/null
+diff -ruN asterisk-1.0.7-old/channels/h323/Makefile asterisk-1.0.7-new/channels/h323/Makefile
+--- asterisk-1.0.7-old/channels/h323/Makefile 2004-11-15 03:35:35.000000000 +0100
++++ asterisk-1.0.7-new/channels/h323/Makefile 2005-03-19 17:38:06.000000000 +0100
+@@ -22,9 +22,11 @@
+ OSARCH=$(shell uname -s)
+ ifneq (${OSARCH},FreeBSD)
+ ifneq (${OSARCH},NetBSD)
++ifneq ($(PROC),mipsel)
+ CFLAGS += -march=$(shell uname -m)
+ endif
+ endif
++endif
+ CFLAGS += -DPBYTE_ORDER=PLITTLE_ENDIAN
+
+ ifeq (${OSARCH},Linux)
+@@ -47,7 +49,7 @@
+
+ # Pre Janus release directives
+ CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
+-CFLAGS += -pipe -Wall -fPIC
++CFLAGS += -pipe -Wall -fPIC $(OPTIMIZE)
+ ifeq (${OSARCH},Linux)
+ CFLAGS += -DP_LINUX
+ LIBS+=-lpthread
+@@ -74,7 +76,7 @@
+
+
+ libchanh323.a: ast_h323.o
+- ar cr libchanh323.a ast_h323.o
++ $(AR) cr libchanh323.a ast_h323.o
+
+ ast_h323.o: ast_h323.cpp
+ $(CXX) -g -c -fno-rtti -o $@ $(CFLAGS) $<
--- /dev/null
+diff -ruN asterisk-1.0.7-old/channels/Makefile asterisk-1.0.7-new/channels/Makefile
+--- asterisk-1.0.7-old/channels/Makefile 2004-08-31 18:33:00.000000000 +0200
++++ asterisk-1.0.7-new/channels/Makefile 2005-03-19 17:38:06.000000000 +0100
+@@ -71,25 +71,25 @@
+ CHANNEL_LIBS+=chan_oss.so
+ endif
+
+-CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
+-CHANNEL_LIBS+=$(shell [ -f /usr/local/include/ixjuser.h ] && echo chan_phone.so)
+-CHANNEL_LIBS+=$(shell [ -f h323/libchanh323.a ] && echo chan_h323.so)
+-
+-CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
+-CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
+-CHANNEL_LIBS+=$(shell [ -f /usr/include/alsa/asoundlib.h ] && echo "chan_alsa.so")
+-CFLAGS+=$(shell [ -f /usr/lib/libpri.so.1 ] && echo " -DZAPATA_PRI")
+-CFLAGS+=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo " -DZAPATA_R2")
+-CFLAGS+=$(shell [ -f alsa-monitor.h ] && echo " -DALSA_MONITOR")
+-ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
+-ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
+-CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
+-CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "-DIAX_TRUNKING")
+-CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
+-CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
++#CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
++#CHANNEL_LIBS+=$(shell [ -f /usr/local/include/ixjuser.h ] && echo chan_phone.so)
++#CHANNEL_LIBS+=$(shell [ -f h323/libchanh323.a ] && echo chan_h323.so)
++
++#CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
++#CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
++#CHANNEL_LIBS+=$(shell [ -f /usr/include/alsa/asoundlib.h ] && echo "chan_alsa.so")
++#CFLAGS+=$(shell [ -f /usr/lib/libpri.so.1 ] && echo " -DZAPATA_PRI")
++#CFLAGS+=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo " -DZAPATA_R2")
++#CFLAGS+=$(shell [ -f alsa-monitor.h ] && echo " -DALSA_MONITOR")
++#ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
++#ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
++#CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
++#CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "-DIAX_TRUNKING")
++#CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
++#CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
+
+-ALSA_SRC=chan_alsa.c
+-ALSA_SRC+=$(shell [ -f alsa-monitor.h ] && echo "alsa-monitor.h")
++#ALSA_SRC=chan_alsa.c
++#ALSA_SRC+=$(shell [ -f alsa-monitor.h ] && echo "alsa-monitor.h")
+
+ CFLAGS+=-DCRYPTO
+ CFLAGS+=-fPIC
+@@ -106,10 +106,10 @@
+
+ ZAPDIR=/usr/lib
+
+-CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
+-CHANNEL_LIBS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "chan_zap.so")
++#CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
++#CHANNEL_LIBS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "chan_zap.so")
+
+-CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
++#CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
+
+ ifndef OPENH323DIR
+ OPENH323DIR=$(HOME)/openh323
--- /dev/null
+diff -ruN asterisk-1.0.7-old/codecs/ilbc/Makefile asterisk-1.0.7-new/codecs/ilbc/Makefile
+--- asterisk-1.0.7-old/codecs/ilbc/Makefile 2004-08-29 19:40:58.000000000 +0200
++++ asterisk-1.0.7-new/codecs/ilbc/Makefile 2005-03-19 17:38:06.000000000 +0100
+@@ -1,5 +1,5 @@
+ ARCH=$(PROC)
+-CFLAGS+=-Wall -fPIC -O3 -funroll-loops -fomit-frame-pointer
++CFLAGS+=-Wall -fPIC $(OPTIMIZE)
+ LIB=libilbc.a
+
+ OBJS= anaFilter.o iCBSearch.o packing.o \
+@@ -12,8 +12,8 @@
+
+
+ $(LIB): $(OBJS)
+- ar cr $(LIB) $(OBJS)
+- ranlib $(LIB)
++ $(AR) cr $(LIB) $(OBJS)
++ $(RANLIB) $(LIB)
+
+ clean:
+ rm -f $(LIB) *.o
--- /dev/null
+diff -ruN asterisk-1.0.7-old/codecs/lpc10/Makefile asterisk-1.0.7-new/codecs/lpc10/Makefile
+--- asterisk-1.0.7-old/codecs/lpc10/Makefile 2004-08-31 18:33:00.000000000 +0200
++++ asterisk-1.0.7-new/codecs/lpc10/Makefile 2005-03-19 17:38:06.000000000 +0100
+@@ -31,6 +31,7 @@
+ ifneq ($(PROC),ppc)
+ ifneq ($(PROC),x86_64)
+ ifneq ($(PROC),alpha)
++ifneq ($(PROC),mipsel)
+ #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.
+@@ -46,6 +47,7 @@
+ endif
+ endif
+ endif
++endif
+
+ LIB = $(LIB_TARGET_DIR)/liblpc10.a
+
+@@ -62,7 +64,7 @@
+
+ $(LIB): $(OBJ)
+ $(AR) cr $@ $(OBJ)
+- ranlib $@
++ $(RANLIB) $@
+
+ clean:
+ -rm -f *.o $(LIB)
--- /dev/null
+diff -ruN asterisk-1.0.7-old/codecs/Makefile asterisk-1.0.7-new/codecs/Makefile
+--- asterisk-1.0.7-old/codecs/Makefile 2005-03-17 15:43:51.000000000 +0100
++++ asterisk-1.0.7-new/codecs/Makefile 2005-03-22 23:26:20.000000000 +0100
+@@ -17,21 +17,21 @@
+ # g723.1b)
+ #
+ #MODG723=codec_g723_1.so codec_g723_1b.so
+-MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so")
+-MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
+-MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/include/speex/speex.h ] || [ -f /usr/local/include/speex.h ] || [ -f /usr/local/include/speex/speex.h ] && echo "codec_speex.so")
++#MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so")
++#MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
++#MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/include/speex/speex.h ] || [ -f /usr/local/include/speex.h ] || [ -f /usr/local/include/speex/speex.h ] && echo "codec_speex.so")
+ MODILBC=$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so")
+ CFLAGS+=-fPIC
+-CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include")
+-CFLAGS+=$(shell [ -f /usr/local/include/speex/speex.h ] && echo "-I/usr/local/include/speex")
+-CFLAGS+=$(shell [ -f /usr/include/speex/speex.h ] && echo "-I/usr/include/speex")
++#CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include")
++#CFLAGS+=$(shell [ -f /usr/local/include/speex/speex.h ] && echo "-I/usr/local/include/speex")
++#CFLAGS+=$(shell [ -f /usr/include/speex/speex.h ] && echo "-I/usr/include/speex")
+
+ LIBG723=g723.1/libg723.a
+ LIBG723B=g723.1b/libg723b.a
+ LIBGSM=gsm/lib/libgsm.a
+ LIBGSMT=gsm/lib/libgsm.a
+ LIBLPC10=lpc10/liblpc10.a
+-LIBSPEEX=$(shell [ -f /usr/local/lib/libspeex.a ] && echo "-L/usr/local/lib")
++LIBSPEEX=$(LDFLAGS_EXTRA)
+ LIBSPEEX+=-lspeex -lm
+ LIBILBC=ilbc/libilbc.a
+
+@@ -43,26 +43,26 @@
+
+ clean:
+ rm -f *.so *.o .depend
+- ! [ -d g723.1 ] || $(MAKE) -C g723.1 clean
+- ! [ -d g723.1b ] || $(MAKE) -C g723.1b clean
+- $(MAKE) -C gsm clean
+- $(MAKE) -C lpc10 clean
+- $(MAKE) -C ilbc clean
++ ! [ -d g723.1 ] || $(MAKE) PROC=$(PROC) -C g723.1 clean
++ ! [ -d g723.1b ] || $(MAKE) PROC=$(PROC) -C g723.1b clean
++ $(MAKE) PROC=$(PROC) -C gsm clean
++ $(MAKE) PROC=$(PROC) -C lpc10 clean
++ $(MAKE) PROC=$(PROC) -C ilbc clean
+
+ $(LIBG723):
+- $(MAKE) -C g723.1 all
++ $(MAKE) PROC=$(PROC) -C g723.1 all
+
+ gsm/lib/libgsm.a:
+- $(MAKE) -C gsm lib/libgsm.a
++ $(MAKE) PROC=$(PROC) -C gsm lib/libgsm.a
+
+ $(LIBG723B):
+- $(MAKE) -C g723.1b all
++ $(MAKE) PROC=$(PROC) -C g723.1b all
+
+ $(LIBLPC10):
+- $(MAKE) -C lpc10 all
++ $(MAKE) PROC=$(PROC) -C lpc10 all
+
+ $(LIBILBC):
+- $(MAKE) -C ilbc all
++ $(MAKE) PROC=$(PROC) -C ilbc all
+
+ codec_ilbc.so: codec_ilbc.o $(LIBILBC)
+ $(CC) $(SOLINK) -o $@ $< $(LIBILBC)
--- /dev/null
+diff -ruN asterisk-1.0.7-old/res/Makefile asterisk-1.0.7-new/res/Makefile
+--- asterisk-1.0.7-old/res/Makefile 2004-07-17 22:58:01.000000000 +0200
++++ asterisk-1.0.7-new/res/Makefile 2005-03-19 17:58:17.000000000 +0100
+@@ -13,9 +13,9 @@
+
+ MODS=res_adsi.so res_features.so res_crypto.so res_musiconhold.so res_indications.so res_monitor.so \
+ res_agi.so
+-MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
+-MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
+-MODS+=$(shell if [ -f "/usr/include/osp/osp.h" ]; then echo "res_osp.so"; fi)
++#MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
++#MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
++#MODS+=$(shell if [ -f "/usr/include/osp/osp.h" ]; then echo "res_osp.so"; fi)
+
+ CRYPTO_LIBS=-lssl -lcrypto
+
--- /dev/null
+diff -ruN asterisk-1.0.7-old/stdtime/Makefile asterisk-1.0.7-new/stdtime/Makefile
+--- asterisk-1.0.7-old/stdtime/Makefile 2003-11-05 07:19:41.000000000 +0100
++++ asterisk-1.0.7-new/stdtime/Makefile 2005-03-19 17:38:06.000000000 +0100
+@@ -3,8 +3,8 @@
+ all: libtime.a
+
+ libtime.a: $(OBJS)
+- ar rv $@ $(OBJS)
+- ranlib $@
++ $(AR) rv $@ $(OBJS)
++ $(RANLIB) $@
+
+ install:
+
--- /dev/null
+diff -ruN asterisk-1.0.7-old/Makefile asterisk-1.0.7-new/Makefile
+--- asterisk-1.0.7-old/Makefile 2005-03-10 09:15:05.000000000 +0100
++++ asterisk-1.0.7-new/Makefile 2005-03-19 17:38:06.000000000 +0100
+@@ -63,10 +63,10 @@
+ #K6OPT = -DK6OPT
+
+ #Tell gcc to optimize the asterisk's code
+-OPTIMIZE+=-O6
++#OPTIMIZE+=-O6
+
+ #Include debug symbols in the executables (-g) and profiling info (-pg)
+-DEBUG=-g #-pg
++#DEBUG=-g #-pg
+
+ # If you are running a radio application, define RADIO_RELAX so that the DTMF
+ # will be received more reliably
+@@ -74,7 +74,7 @@
+
+ # If you don't have a lot of memory (e.g. embedded Asterisk), uncomment the
+ # following to reduce the size of certain static buffers
+-#OPTIONS += -DLOW_MEMORY
++OPTIONS += -DLOW_MEMORY
+
+ # Optional debugging parameters
+ DEBUG_THREADS = #-DDEBUG_THREADS #-DDO_CRASH
+@@ -112,7 +112,7 @@
+ BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
+
+ ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
+-ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
++ASTVARLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
+ ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
+ ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
+ ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
+@@ -128,7 +128,7 @@
+
+ INCLUDE=-Iinclude -I../include
+ CFLAGS=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
+-CFLAGS+=$(OPTIMIZE)
++CFLAGS+=$(OPTIMIZE) $(CFLAGS_EXTRA)
+
+ ifneq ($(PROC),ultrasparc)
+ CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
+@@ -187,7 +187,7 @@
+ CFLAGS+=# -fomit-frame-pointer
+ SUBDIRS=res channels pbx apps codecs formats agi cdr astman stdtime
+ ifeq (${OSARCH},Linux)
+-LIBS=-ldl -lpthread
++LIBS=$(LDFLAGS_EXTRA) -ldl -lpthread
+ endif
+ LIBS+=-lncurses -lm
+ ifeq (${OSARCH},Linux)
+@@ -205,7 +205,7 @@
+ ifeq (${OSARCH},OpenBSD)
+ LIBS=-lcrypto -lpthread -lm -lncurses
+ endif
+-LIBS+=-lssl
++LIBS+=-Wl,-Bstatic -lssl -Wl,-Bdynamic
+ OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
+ translate.o file.o say.o pbx.o cli.o md5.o term.o \
+ ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \
+@@ -240,12 +240,12 @@
+ cd editline && unset CFLAGS LIBS && ./configure ; \
+
+ editline/libedit.a: FORCE
+- cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
+- $(MAKE) -C editline libedit.a
++ cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE) $(CFLAGS_EXTRA)" LDFLAGS="$(LDFLAGS_EXTRA)" ./configure
++ $(MAKE) PROC=$(PROC) CFLAGS="$(OPTIMIZE)" -C editline libedit.a
+
+ db1-ast/libdb1.a: FORCE
+ @if [ -d db1-ast ]; then \
+- $(MAKE) -C db1-ast libdb1.a ; \
++ $(MAKE) PROC=$(PROC) OORG="$(OPTIMIZE)" -C db1-ast libdb1.a ; \
+ else \
+ echo "You need to do a cvs update -d not just cvs update"; \
+ exit 1; \
+@@ -289,7 +289,7 @@
+
+ stdtime/libtime.a: FORCE
+ @if [ -d stdtime ]; then \
+- $(MAKE) -C stdtime libtime.a ; \
++ $(MAKE) PROC=$(PROC) -C stdtime libtime.a ; \
+ else \
+ echo "You need to do a cvs update -d not just cvs update"; \
+ exit 1; \
+@@ -381,7 +381,7 @@
+ if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
+ install -m 755 contrib/scripts/safe_asterisk $(DESTDIR)$(ASTSBINDIR)/ ;\
+ fi
+- for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
++ for x in $(SUBDIRS); do $(MAKE) PROC=$(PROC) -C $$x install || exit 1 ; done
+ install -d $(DESTDIR)$(ASTHEADERDIR)
+ install -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
+ rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/vm
+@@ -519,8 +519,8 @@
+ __rpm: _version
+ rm -rf /tmp/asterisk ; \
+ mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
+- $(MAKE) DESTDIR=/tmp/asterisk install ; \
+- $(MAKE) DESTDIR=/tmp/asterisk samples ; \
++ $(MAKE) PROC=$(PROC) DESTDIR=/tmp/asterisk install ; \
++ $(MAKE) PROC=$(PROC) DESTDIR=/tmp/asterisk samples ; \
+ mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
+ cp -f redhat/asterisk /tmp/asterisk/etc/rc.d/init.d/ ; \
+ sed "s/^Version:.*/Version: $(RPMVERSION)/g" redhat/asterisk.spec > asterisk.spec ; \
+@@ -544,12 +544,12 @@
+ fi
+
+ dont-optimize:
+- $(MAKE) OPTIMIZE= K6OPT= install
++ $(MAKE) PROC=$(PROC) OPTIMIZE= K6OPT= install
+
+ valgrind: dont-optimize
+
+ depend: .depend
+- for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
++ for x in $(SUBDIRS); do $(MAKE) PROC=$(PROC) -C $$x depend || exit 1 ; done
+
+ .depend:
+ @if ! which mpg123 &>/dev/null ; then \
--- /dev/null
+diff -ruN asterisk-1.0.7-old/dns.c asterisk-1.0.7-new/dns.c
+--- asterisk-1.0.7-old/dns.c 2004-06-22 22:11:15.000000000 +0200
++++ asterisk-1.0.7-new/dns.c 2005-03-19 17:38:06.000000000 +0100
+@@ -153,7 +153,13 @@
+
+ #if defined(res_ninit)
+ #define HAS_RES_NINIT
+-#else
++#endif
++
++#ifdef __UCLIBC__
++#undef HAS_RES_NINIT
++#endif
++
++#ifndef HAS_RES_NINIT
+ AST_MUTEX_DEFINE_STATIC(res_lock);
+ #if 0
+ #warning "Warning, res_ninit is missing... Could have reentrancy issues"
+++ /dev/null
-diff -ruN asterisk-1.0.7-old/configs/modules.conf.sample asterisk-1.0.7-new/configs/modules.conf.sample
---- asterisk-1.0.7-old/configs/modules.conf.sample 2003-06-26 20:57:54.000000000 +0200
-+++ asterisk-1.0.7-new/configs/modules.conf.sample 2005-10-25 04:08:28.000000000 +0200
-@@ -7,33 +7,91 @@
- [modules]
- autoload=yes
- ;
--; If you want, load the GTK console right away.
--; Don't load the KDE console since
--; it's not as sophisticated right now.
--;
--noload => pbx_gtkconsole.so
--;load => pbx_gtkconsole.so
--noload => pbx_kdeconsole.so
--;
--; Intercom application is obsoleted by
--; chan_oss. Don't load it.
--;
--noload => app_intercom.so
--;
--; Explicitly load the chan_modem.so early on to be sure
--; it loads before any of the chan_modem_* 's afte rit
--;
--load => chan_modem.so
--load => res_musiconhold.so
--;
--; Load either OSS or ALSA, not both
--; By default, load OSS only (automatically) and do not load ALSA
--;
--noload => chan_alsa.so
--;noload => chan_oss.so
-+; load => res_features.so ; Call Parking Resource
-+noload => res_indications.so ; Indications Configuration
-+noload => res_monitor.so ; Call Monitoring Resource
-+; load => res_musiconhold.so ; Music On Hold Resource
-+noload => cdr_csv.so ; Comma Separated Values CDR Backend
-+noload => cdr_manager.so ; Asterisk Call Manager CDR Backend
-+noload => chan_agent.so ; Agent Proxy Channel
-+; load => chan_iax2.so ; Inter Asterisk eXchange (Ver 2)
-+; load => chan_local.so ; Local Proxy Channel
-+; load => chan_sip.so ; Session Initiation Protocol (SIP)
-+noload => codec_a_mu.so ; A-law and Mulaw direct Coder/Decoder
-+noload => codec_adpcm.so ; Adaptive Differential PCM Coder/Decoder
-+noload => codec_alaw.so ; A-law Coder/Decoder
-+noload => codec_g726.so ; ITU G.726-32kbps G726 Transcoder
-+; load => codec_gsm.so ; GSM/PCM16 (signed linear) Codec Translat
-+; load => codec_ulaw.so ; Mu-law Coder/Decoder
-+noload => format_g726.so ; Raw G.726 (16/24/32/40kbps) data
-+noload => format_g729.so ; Raw G729 data
-+; load => format_gsm.so ; Raw GSM data
-+noload => format_h263.so ; Raw h263 data
-+noload => format_jpeg.so ; JPEG (Joint Picture Experts Group) Image
-+; load => format_pcm.so ; Raw uLaw 8khz Audio support (PCM)
-+noload => format_pcm_alaw.so ; Raw aLaw 8khz PCM Audio support
-+noload => format_sln.so ; Raw Signed Linear Audio support (SLN)
-+noload => format_vox.so ; Dialogic VOX (ADPCM) File Format
-+; load => format_wav.so ; Microsoft WAV format (8000hz Signed Line
-+; load => format_wav_gsm.so ; Microsoft WAV format (Proprietary GSM)
-+noload => app_alarmreceiver.so ; Alarm Receiver for Asterisk
-+noload => app_authenticate.so ; Authentication Application
-+noload => app_cdr.so ; Make sure asterisk doesn't save CDR for
-+noload => app_chanisavail.so ; Check if channel is available
-+noload => app_controlplayback.so ; Control Playback Application
-+noload => app_cut.so ; Cuts up variables
-+noload => app_db.so ; Database access functions for Asterisk e
-+; load => app_dial.so ; Dialing Application
-+noload => app_directory.so ; Extension Directory
-+noload => app_disa.so ; DISA (Direct Inward System Access) Appli
-+; load => app_echo.so ; Simple Echo Application
-+noload => app_enumlookup.so ; ENUM Lookup
-+noload => app_eval.so ; Reevaluates strings
-+noload => app_exec.so ; Executes applications
-+noload => app_forkcdr.so ; Fork The CDR into 2 seperate entities.
-+noload => app_getcpeid.so ; Get ADSI CPE ID
-+noload => app_groupcount.so ; Group Management Routines
-+noload => app_ices.so ; Encode and Stream via icecast and ices
-+noload => app_image.so ; Image Transmission Application
-+noload => app_lookupblacklist.so ; Look up Caller*ID name/number from black
-+noload => app_lookupcidname.so ; Look up CallerID Name from local databas
-+; load => app_macro.so ; Extension Macros
-+; load => app_milliwatt.so ; Digital Milliwatt (mu-law) Test Applicat
-+noload => app_parkandannounce.so ; Call Parking and Announce Application
-+; load => app_playback.so ; Trivial Playback Application
-+noload => app_privacy.so ; Require phone number to be entered, if n
-+noload => app_qcall.so ; Call from Queue
-+noload => app_queue.so ; True Call Queueing
-+noload => app_random.so ; Random goto
-+noload => app_read.so ; Read Variable Application
-+noload => app_record.so ; Trivial Record Application
-+; load => app_sayunixtime.so ; Say time
-+noload => app_senddtmf.so ; Send DTMF digits Application
-+noload => app_sendtext.so ; Send Text Applications
-+noload => app_setcallerid.so ; Set CallerID Application
-+noload => app_setcdruserfield.so ; CDR user field apps
-+noload => app_setcidname.so ; Set CallerID Name
-+noload => app_setcidnum.so ; Set CallerID Number
-+noload => app_sms.so ; SMS/PSTN handler
-+noload => app_softhangup.so ; Hangs up the requested channel
-+noload => app_striplsd.so ; Strip trailing digits
-+noload => app_substring.so ; (Deprecated) Save substring digits in a
-+noload => app_system.so ; Generic System() application
-+noload => app_talkdetect.so ; Playback with Talk Detection
-+noload => app_test.so ; Interface Test Application
-+noload => app_transfer.so ; Transfer
-+noload => app_txtcidname.so ; TXTCIDName
-+noload => app_url.so ; Send URL Applications
-+noload => app_userevent.so ; Custom User Event Application
-+; load => app_verbose.so ; Send verbose output
-+noload => app_waitforring.so ; Waits until first ring after time
-+; load => pbx_config.so ; Text Extension Configuration
-+noload => pbx_spool.so ; Outgoing Spool Support
-+noload => pbx_wilcalu.so ; Wil Cal U (Auto Dialer)
-+
- ;
- ; Module names listed in "global" section will have symbols globally
- ; exported to modules loaded after them.
- ;
- [global]
--chan_modem.so=yes
-+chan_modem.so=no
--- /dev/null
+--- asterisk-1.0.7.old/res/Makefile 2005-04-25 20:53:11.000000000 +0200
++++ asterisk-1.0.7/res/Makefile 2005-04-25 20:53:26.000000000 +0200
+@@ -11,7 +11,7 @@
+ # the GNU General Public License
+ #
+
+-MODS=res_adsi.so res_features.so res_crypto.so res_musiconhold.so res_indications.so res_monitor.so \
++MODS=res_adsi.so res_features.so res_musiconhold.so res_indications.so res_monitor.so \
+ res_agi.so
+ #MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
+ #MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
--- /dev/null
+diff -urN asterisk-1.0.7.old/astman/Makefile asterisk-1.0.7.dev/astman/Makefile
+--- asterisk-1.0.7.old/astman/Makefile 2004-06-26 21:25:39.000000000 +0200
++++ asterisk-1.0.7.dev/astman/Makefile 2005-04-29 15:54:53.000000000 +0200
+@@ -8,7 +8,7 @@
+ CFLAGS+=-I/usr/local/include -L/usr/local/lib
+ endif
+
+-TARGET=$(shell if [ -f /usr/include/newt.h ]; then echo "astman"; else if [ -f /usr/local/include/newt.h ]; then echo "astman"; else echo "none" ; fi ; fi)
++TARGET=none
+ all: depend $(TARGET)
+
+ install:
--- /dev/null
+diff -ruN asterisk-1.0.9-old/codecs/gsm/Makefile asterisk-1.0.9-new/codecs/gsm/Makefile
+--- asterisk-1.0.9-old/codecs/gsm/Makefile 2005-06-21 16:27:28.000000000 +0200
++++ asterisk-1.0.9-new/codecs/gsm/Makefile 2005-07-11 13:36:12.000000000 +0200
+@@ -40,12 +40,12 @@
+ ifneq (${OSARCH},Darwin)
+ ifneq (${PROC},x86_64)
+ ifneq (${PROC},ultrasparc)
+-ifneq ($(shell uname -m),ppc)
+-ifneq ($(shell uname -m),alpha)
+-ifneq ($(shell uname -m),armv4l)
++ifneq (${PROC},alpha)
++ifneq (${PROC},armv4l)
+ ifneq (${PROC},sparc64)
+ ifneq (${PROC},ppc)
+ ifneq (${PROC},ppc64)
++ifneq (${PROC},mipsel)
+ OPTIMIZE+=-march=$(PROC)
+ endif
+ endif
+@@ -84,7 +84,7 @@
+ # CCFLAGS = -c -O
+
+ CC ?= gcc
+-CCFLAGS += -c -DNeedFunctionPrototypes=1 -funroll-loops -fPIC $(OPTIMIZE) -fomit-frame-pointer
++CCFLAGS += -c -DNeedFunctionPrototypes=1 -fPIC $(OPTIMIZE)
+
+ LD = $(CC)
+
+@@ -219,11 +219,12 @@
+ $(SRC)/short_term.c \
+ $(SRC)/table.c
+ ifeq (${OSARCH},Linux)
+-ifneq ($(shell uname -m),x86_64)
+-ifneq ($(shell uname -m),ppc)
+-ifneq ($(shell uname -m),alpha)
+-ifneq ($(shell uname -m),armv4l)
+-ifneq ($(shell uname -m),sparc64)
++ifneq (${PROC},x86_64)
++ifneq (${PROC},ppc)
++ifneq (${PROC},alpha)
++ifneq (${PROC},armv4l)
++ifneq (${PROC},sparc64)
++ifneq ($(PROC),mipsel)
+ GSM_SOURCES+= $(SRC)/k6opt.s
+ endif
+ endif
+@@ -231,6 +232,7 @@
+ endif
+ endif
+ endif
++endif
+
+ TOAST_SOURCES = $(SRC)/toast.c \
+ $(SRC)/toast_lin.c \
+@@ -277,11 +279,12 @@
+ $(SRC)/table.o
+
+ ifeq (${OSARCH},Linux)
+-ifneq ($(shell uname -m), x86_64)
+-ifneq ($(shell uname -m), ppc)
+-ifneq ($(shell uname -m), alpha)
+-ifneq ($(shell uname -m), armv4l)
+-ifneq ($(shell uname -m), sparc64)
++ifneq (${PROC}, x86_64)
++ifneq (${PROC}, ppc)
++ifneq (${PROC}, alpha)
++ifneq (${PROC}, armv4l)
++ifneq (${PROC}, sparc64)
++ifneq ($(PROC), mipsel)
+ GSM_OBJECTS+= $(SRC)/k6opt.o
+ endif
+ endif
+@@ -289,6 +292,7 @@
+ endif
+ endif
+ endif
++endif
+
+ TOAST_OBJECTS = $(SRC)/toast.o \
+ $(SRC)/toast_lin.o \
+++ /dev/null
-diff -ruN asterisk-1.0.7-orig/Makefile asterisk-1.0.7-2/Makefile
---- asterisk-1.0.7-orig/Makefile 2005-03-10 09:15:05.000000000 +0100
-+++ asterisk-1.0.7-2/Makefile 2005-03-19 17:38:06.000000000 +0100
-@@ -63,10 +63,10 @@
- #K6OPT = -DK6OPT
-
- #Tell gcc to optimize the asterisk's code
--OPTIMIZE+=-O6
-+#OPTIMIZE+=-O6
-
- #Include debug symbols in the executables (-g) and profiling info (-pg)
--DEBUG=-g #-pg
-+#DEBUG=-g #-pg
-
- # If you are running a radio application, define RADIO_RELAX so that the DTMF
- # will be received more reliably
-@@ -74,7 +74,7 @@
-
- # If you don't have a lot of memory (e.g. embedded Asterisk), uncomment the
- # following to reduce the size of certain static buffers
--#OPTIONS += -DLOW_MEMORY
-+OPTIONS += -DLOW_MEMORY
-
- # Optional debugging parameters
- DEBUG_THREADS = #-DDEBUG_THREADS #-DDO_CRASH
-@@ -112,7 +112,7 @@
- BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
-
- ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
--ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
-+ASTVARLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
- ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
- ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
- ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
-@@ -128,7 +128,7 @@
-
- INCLUDE=-Iinclude -I../include
- CFLAGS=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
--CFLAGS+=$(OPTIMIZE)
-+CFLAGS+=$(OPTIMIZE) $(CFLAGS_EXTRA)
-
- ifneq ($(PROC),ultrasparc)
- CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
-@@ -187,7 +187,7 @@
- CFLAGS+=# -fomit-frame-pointer
- SUBDIRS=res channels pbx apps codecs formats agi cdr astman stdtime
- ifeq (${OSARCH},Linux)
--LIBS=-ldl -lpthread
-+LIBS=$(LDFLAGS_EXTRA) -ldl -lpthread
- endif
- LIBS+=-lncurses -lm
- ifeq (${OSARCH},Linux)
-@@ -205,7 +205,7 @@
- ifeq (${OSARCH},OpenBSD)
- LIBS=-lcrypto -lpthread -lm -lncurses
- endif
--LIBS+=-lssl
-+LIBS+=-Wl,-Bstatic -lssl -Wl,-Bdynamic
- OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
- translate.o file.o say.o pbx.o cli.o md5.o term.o \
- ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \
-@@ -240,12 +240,12 @@
- cd editline && unset CFLAGS LIBS && ./configure ; \
-
- editline/libedit.a: FORCE
-- cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
-- $(MAKE) -C editline libedit.a
-+ cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE) $(CFLAGS_EXTRA)" LDFLAGS="$(LDFLAGS_EXTRA)" ./configure
-+ $(MAKE) PROC=$(PROC) CFLAGS="$(OPTIMIZE)" -C editline libedit.a
-
- db1-ast/libdb1.a: FORCE
- @if [ -d db1-ast ]; then \
-- $(MAKE) -C db1-ast libdb1.a ; \
-+ $(MAKE) PROC=$(PROC) OORG="$(OPTIMIZE)" -C db1-ast libdb1.a ; \
- else \
- echo "You need to do a cvs update -d not just cvs update"; \
- exit 1; \
-@@ -289,7 +289,7 @@
-
- stdtime/libtime.a: FORCE
- @if [ -d stdtime ]; then \
-- $(MAKE) -C stdtime libtime.a ; \
-+ $(MAKE) PROC=$(PROC) -C stdtime libtime.a ; \
- else \
- echo "You need to do a cvs update -d not just cvs update"; \
- exit 1; \
-@@ -381,7 +381,7 @@
- if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
- install -m 755 contrib/scripts/safe_asterisk $(DESTDIR)$(ASTSBINDIR)/ ;\
- fi
-- for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
-+ for x in $(SUBDIRS); do $(MAKE) PROC=$(PROC) -C $$x install || exit 1 ; done
- install -d $(DESTDIR)$(ASTHEADERDIR)
- install -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
- rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/vm
-@@ -519,8 +519,8 @@
- __rpm: _version
- rm -rf /tmp/asterisk ; \
- mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
-- $(MAKE) DESTDIR=/tmp/asterisk install ; \
-- $(MAKE) DESTDIR=/tmp/asterisk samples ; \
-+ $(MAKE) PROC=$(PROC) DESTDIR=/tmp/asterisk install ; \
-+ $(MAKE) PROC=$(PROC) DESTDIR=/tmp/asterisk samples ; \
- mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
- cp -f redhat/asterisk /tmp/asterisk/etc/rc.d/init.d/ ; \
- sed "s/^Version:.*/Version: $(RPMVERSION)/g" redhat/asterisk.spec > asterisk.spec ; \
-@@ -544,12 +544,12 @@
- fi
-
- dont-optimize:
-- $(MAKE) OPTIMIZE= K6OPT= install
-+ $(MAKE) PROC=$(PROC) OPTIMIZE= K6OPT= install
-
- valgrind: dont-optimize
-
- depend: .depend
-- for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
-+ for x in $(SUBDIRS); do $(MAKE) PROC=$(PROC) -C $$x depend || exit 1 ; done
-
- .depend:
- @if ! which mpg123 &>/dev/null ; then \
-diff -ruN asterisk-1.0.7-orig/apps/Makefile asterisk-1.0.7-2/apps/Makefile
---- asterisk-1.0.7-orig/apps/Makefile 2004-09-24 23:32:56.000000000 +0200
-+++ asterisk-1.0.7-2/apps/Makefile 2005-03-19 17:38:06.000000000 +0100
-@@ -35,13 +35,14 @@
- APPS+=app_intercom.so
- endif
-
--#APPS+=app_sql_postgres.so
-+# add extra apps
-+APPS+=$(EXTRA_APPS)
- #APPS+=app_sql_odbc.so
- #APPS+=app_rpt.so
-
--APPS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
--APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
--APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
-+#APPS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
-+#APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
-+#APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
-
- CFLAGS+=-fPIC
-
-diff -ruN asterisk-1.0.7-orig/cdr/Makefile asterisk-1.0.7-2/cdr/Makefile
---- asterisk-1.0.7-orig/cdr/Makefile 2004-08-31 18:33:00.000000000 +0200
-+++ asterisk-1.0.7-2/cdr/Makefile 2005-03-19 17:38:06.000000000 +0100
-@@ -12,7 +12,7 @@
- #
-
- #ADD cdr_pgsql.so to MODS= to include PostgreSQL support: REQUIRES PostgreSQL libs
--MODS=cdr_csv.so cdr_manager.so
-+MODS=cdr_csv.so cdr_manager.so $(EXTRA_MODS)
-
-
- CFLAGS+=-fPIC
-diff -ruN asterisk-1.0.7-orig/channels/Makefile asterisk-1.0.7-2/channels/Makefile
---- asterisk-1.0.7-orig/channels/Makefile 2004-08-31 18:33:00.000000000 +0200
-+++ asterisk-1.0.7-2/channels/Makefile 2005-03-19 17:38:06.000000000 +0100
-@@ -71,25 +71,25 @@
- CHANNEL_LIBS+=chan_oss.so
- endif
-
--CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
--CHANNEL_LIBS+=$(shell [ -f /usr/local/include/ixjuser.h ] && echo chan_phone.so)
--CHANNEL_LIBS+=$(shell [ -f h323/libchanh323.a ] && echo chan_h323.so)
--
--CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
--CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
--CHANNEL_LIBS+=$(shell [ -f /usr/include/alsa/asoundlib.h ] && echo "chan_alsa.so")
--CFLAGS+=$(shell [ -f /usr/lib/libpri.so.1 ] && echo " -DZAPATA_PRI")
--CFLAGS+=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo " -DZAPATA_R2")
--CFLAGS+=$(shell [ -f alsa-monitor.h ] && echo " -DALSA_MONITOR")
--ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
--ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
--CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
--CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "-DIAX_TRUNKING")
--CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
--CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
-+#CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
-+#CHANNEL_LIBS+=$(shell [ -f /usr/local/include/ixjuser.h ] && echo chan_phone.so)
-+#CHANNEL_LIBS+=$(shell [ -f h323/libchanh323.a ] && echo chan_h323.so)
-+
-+#CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
-+#CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
-+#CHANNEL_LIBS+=$(shell [ -f /usr/include/alsa/asoundlib.h ] && echo "chan_alsa.so")
-+#CFLAGS+=$(shell [ -f /usr/lib/libpri.so.1 ] && echo " -DZAPATA_PRI")
-+#CFLAGS+=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo " -DZAPATA_R2")
-+#CFLAGS+=$(shell [ -f alsa-monitor.h ] && echo " -DALSA_MONITOR")
-+#ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
-+#ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
-+#CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
-+#CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "-DIAX_TRUNKING")
-+#CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
-+#CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
-
--ALSA_SRC=chan_alsa.c
--ALSA_SRC+=$(shell [ -f alsa-monitor.h ] && echo "alsa-monitor.h")
-+#ALSA_SRC=chan_alsa.c
-+#ALSA_SRC+=$(shell [ -f alsa-monitor.h ] && echo "alsa-monitor.h")
-
- CFLAGS+=-DCRYPTO
- CFLAGS+=-fPIC
-@@ -106,10 +106,10 @@
-
- ZAPDIR=/usr/lib
-
--CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
--CHANNEL_LIBS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "chan_zap.so")
-+#CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
-+#CHANNEL_LIBS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "chan_zap.so")
-
--CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
-+#CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
-
- ifndef OPENH323DIR
- OPENH323DIR=$(HOME)/openh323
-diff -ruN asterisk-1.0.7-orig/channels/h323/Makefile asterisk-1.0.7-2/channels/h323/Makefile
---- asterisk-1.0.7-orig/channels/h323/Makefile 2004-11-15 03:35:35.000000000 +0100
-+++ asterisk-1.0.7-2/channels/h323/Makefile 2005-03-19 17:38:06.000000000 +0100
-@@ -22,9 +22,11 @@
- OSARCH=$(shell uname -s)
- ifneq (${OSARCH},FreeBSD)
- ifneq (${OSARCH},NetBSD)
-+ifneq ($(PROC),mipsel)
- CFLAGS += -march=$(shell uname -m)
- endif
- endif
-+endif
- CFLAGS += -DPBYTE_ORDER=PLITTLE_ENDIAN
-
- ifeq (${OSARCH},Linux)
-@@ -47,7 +49,7 @@
-
- # Pre Janus release directives
- CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
--CFLAGS += -pipe -Wall -fPIC
-+CFLAGS += -pipe -Wall -fPIC $(OPTIMIZE)
- ifeq (${OSARCH},Linux)
- CFLAGS += -DP_LINUX
- LIBS+=-lpthread
-@@ -74,7 +76,7 @@
-
-
- libchanh323.a: ast_h323.o
-- ar cr libchanh323.a ast_h323.o
-+ $(AR) cr libchanh323.a ast_h323.o
-
- ast_h323.o: ast_h323.cpp
- $(CXX) -g -c -fno-rtti -o $@ $(CFLAGS) $<
-diff -ruN asterisk-1.0.7-orig/codecs/Makefile asterisk-1.0.7-2/codecs/Makefile
---- asterisk-1.0.7-orig/codecs/Makefile 2005-03-17 15:43:51.000000000 +0100
-+++ asterisk-1.0.7-2/codecs/Makefile 2005-03-22 23:26:20.000000000 +0100
-@@ -17,21 +17,21 @@
- # g723.1b)
- #
- #MODG723=codec_g723_1.so codec_g723_1b.so
--MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so")
--MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
--MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/include/speex/speex.h ] || [ -f /usr/local/include/speex.h ] || [ -f /usr/local/include/speex/speex.h ] && echo "codec_speex.so")
-+#MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so")
-+#MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
-+MODSPEEX=codec_speex.so
- MODILBC=$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so")
- CFLAGS+=-fPIC
--CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include")
--CFLAGS+=$(shell [ -f /usr/local/include/speex/speex.h ] && echo "-I/usr/local/include/speex")
--CFLAGS+=$(shell [ -f /usr/include/speex/speex.h ] && echo "-I/usr/include/speex")
-+#CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include")
-+#CFLAGS+=$(shell [ -f /usr/local/include/speex/speex.h ] && echo "-I/usr/local/include/speex")
-+#CFLAGS+=$(shell [ -f /usr/include/speex/speex.h ] && echo "-I/usr/include/speex")
-
- LIBG723=g723.1/libg723.a
- LIBG723B=g723.1b/libg723b.a
- LIBGSM=gsm/lib/libgsm.a
- LIBGSMT=gsm/lib/libgsm.a
- LIBLPC10=lpc10/liblpc10.a
--LIBSPEEX=$(shell [ -f /usr/local/lib/libspeex.a ] && echo "-L/usr/local/lib")
-+LIBSPEEX=$(LDFLAGS_EXTRA)
- LIBSPEEX+=-lspeex -lm
- LIBILBC=ilbc/libilbc.a
-
-@@ -43,26 +43,26 @@
-
- clean:
- rm -f *.so *.o .depend
-- ! [ -d g723.1 ] || $(MAKE) -C g723.1 clean
-- ! [ -d g723.1b ] || $(MAKE) -C g723.1b clean
-- $(MAKE) -C gsm clean
-- $(MAKE) -C lpc10 clean
-- $(MAKE) -C ilbc clean
-+ ! [ -d g723.1 ] || $(MAKE) PROC=$(PROC) -C g723.1 clean
-+ ! [ -d g723.1b ] || $(MAKE) PROC=$(PROC) -C g723.1b clean
-+ $(MAKE) PROC=$(PROC) -C gsm clean
-+ $(MAKE) PROC=$(PROC) -C lpc10 clean
-+ $(MAKE) PROC=$(PROC) -C ilbc clean
-
- $(LIBG723):
-- $(MAKE) -C g723.1 all
-+ $(MAKE) PROC=$(PROC) -C g723.1 all
-
- gsm/lib/libgsm.a:
-- $(MAKE) -C gsm lib/libgsm.a
-+ $(MAKE) PROC=$(PROC) -C gsm lib/libgsm.a
-
- $(LIBG723B):
-- $(MAKE) -C g723.1b all
-+ $(MAKE) PROC=$(PROC) -C g723.1b all
-
- $(LIBLPC10):
-- $(MAKE) -C lpc10 all
-+ $(MAKE) PROC=$(PROC) -C lpc10 all
-
- $(LIBILBC):
-- $(MAKE) -C ilbc all
-+ $(MAKE) PROC=$(PROC) -C ilbc all
-
- codec_ilbc.so: codec_ilbc.o $(LIBILBC)
- $(CC) $(SOLINK) -o $@ $< $(LIBILBC)
-diff -ruN asterisk-1.0.7-orig/codecs/gsm/Makefile asterisk-1.0.7-2/codecs/gsm/Makefile
---- asterisk-1.0.7-orig/codecs/gsm/Makefile 2004-12-21 21:49:24.000000000 +0100
-+++ asterisk-1.0.7-2/codecs/gsm/Makefile 2005-03-19 17:38:06.000000000 +0100
-@@ -40,9 +40,10 @@
- ifneq (${OSARCH},Darwin)
- ifneq (${PROC},x86_64)
- ifneq (${PROC},ultrasparc)
--ifneq ($(shell uname -m),ppc)
--ifneq ($(shell uname -m),alpha)
-+ifneq ($(PROC),ppc)
-+ifneq ($(PROC),alpha)
- ifneq (${PROC},sparc64)
-+ifneq ($(PROC),mipsel)
- OPTIMIZE+=-march=$(PROC)
- endif
- endif
-@@ -50,6 +51,7 @@
- endif
- endif
- endif
-+endif
-
- #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.
-@@ -78,7 +80,7 @@
- # CCFLAGS = -c -O
-
- CC ?= gcc
--CCFLAGS += -c -DNeedFunctionPrototypes=1 -funroll-loops -fPIC $(OPTIMIZE) -fomit-frame-pointer
-+CCFLAGS += -c -DNeedFunctionPrototypes=1 -fPIC $(OPTIMIZE)
-
- LD = $(CC)
-
-@@ -213,16 +215,18 @@
- $(SRC)/short_term.c \
- $(SRC)/table.c
- ifeq (${OSARCH},Linux)
--ifneq ($(shell uname -m),x86_64)
--ifneq ($(shell uname -m),ppc)
--ifneq ($(shell uname -m),alpha)
--ifneq ($(shell uname -m),sparc64)
-+ifneq ($(PROC),x86_64)
-+ifneq ($(PROC),ppc)
-+ifneq ($(PROC),alpha)
-+ifneq ($(PROC),sparc64)
-+ifneq ($(PROC),mipsel)
- GSM_SOURCES+= $(SRC)/k6opt.s
- endif
- endif
- endif
- endif
- endif
-+endif
-
- TOAST_SOURCES = $(SRC)/toast.c \
- $(SRC)/toast_lin.c \
-@@ -269,16 +273,18 @@
- $(SRC)/table.o
-
- ifeq (${OSARCH},Linux)
--ifneq ($(shell uname -m), x86_64)
--ifneq ($(shell uname -m), ppc)
--ifneq ($(shell uname -m), alpha)
--ifneq ($(shell uname -m), sparc64)
-+ifneq ($(PROC), x86_64)
-+ifneq ($(PROC), ppc)
-+ifneq ($(PROC), alpha)
-+ifneq ($(PROC), sparc64)
-+ifneq ($(PROC), mipsel)
- GSM_OBJECTS+= $(SRC)/k6opt.o
- endif
- endif
- endif
- endif
- endif
-+endif
-
- TOAST_OBJECTS = $(SRC)/toast.o \
- $(SRC)/toast_lin.o \
-diff -ruN asterisk-1.0.7-orig/codecs/ilbc/Makefile asterisk-1.0.7-2/codecs/ilbc/Makefile
---- asterisk-1.0.7-orig/codecs/ilbc/Makefile 2004-08-29 19:40:58.000000000 +0200
-+++ asterisk-1.0.7-2/codecs/ilbc/Makefile 2005-03-19 17:38:06.000000000 +0100
-@@ -1,5 +1,5 @@
- ARCH=$(PROC)
--CFLAGS+=-Wall -fPIC -O3 -funroll-loops -fomit-frame-pointer
-+CFLAGS+=-Wall -fPIC $(OPTIMIZE)
- LIB=libilbc.a
-
- OBJS= anaFilter.o iCBSearch.o packing.o \
-@@ -12,8 +12,8 @@
-
-
- $(LIB): $(OBJS)
-- ar cr $(LIB) $(OBJS)
-- ranlib $(LIB)
-+ $(AR) cr $(LIB) $(OBJS)
-+ $(RANLIB) $(LIB)
-
- clean:
- rm -f $(LIB) *.o
-diff -ruN asterisk-1.0.7-orig/codecs/lpc10/Makefile asterisk-1.0.7-2/codecs/lpc10/Makefile
---- asterisk-1.0.7-orig/codecs/lpc10/Makefile 2004-08-31 18:33:00.000000000 +0200
-+++ asterisk-1.0.7-2/codecs/lpc10/Makefile 2005-03-19 17:38:06.000000000 +0100
-@@ -31,6 +31,7 @@
- ifneq ($(PROC),ppc)
- ifneq ($(PROC),x86_64)
- ifneq ($(PROC),alpha)
-+ifneq ($(PROC),mipsel)
- #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.
-@@ -46,6 +47,7 @@
- endif
- endif
- endif
-+endif
-
- LIB = $(LIB_TARGET_DIR)/liblpc10.a
-
-@@ -62,7 +64,7 @@
-
- $(LIB): $(OBJ)
- $(AR) cr $@ $(OBJ)
-- ranlib $@
-+ $(RANLIB) $@
-
- clean:
- -rm -f *.o $(LIB)
-diff -ruN asterisk-1.0.7-orig/db1-ast/Makefile asterisk-1.0.7-2/db1-ast/Makefile
---- asterisk-1.0.7-orig/db1-ast/Makefile 2004-08-31 18:33:00.000000000 +0200
-+++ asterisk-1.0.7-2/db1-ast/Makefile 2005-03-19 17:38:06.000000000 +0100
-@@ -32,8 +32,8 @@
-
- $(LIBDB): $(OBJS)
- rm -f $@
-- ar cq $@ $(OBJS)
-- ranlib $@
-+ $(AR) cq $@ $(OBJS)
-+ $(RANLIB) $@
-
- $(LIBDBSO): $(SHOBJS)
- $(CC) -Wl,-O1 -Wl,--version-script=libdb.map -Wl,-soname=$(LIBDBSO) -shared -o $@ $^
-diff -ruN asterisk-1.0.7-orig/dns.c asterisk-1.0.7-2/dns.c
---- asterisk-1.0.7-orig/dns.c 2004-06-22 22:11:15.000000000 +0200
-+++ asterisk-1.0.7-2/dns.c 2005-03-19 17:38:06.000000000 +0100
-@@ -153,7 +153,13 @@
-
- #if defined(res_ninit)
- #define HAS_RES_NINIT
--#else
-+#endif
-+
-+#ifdef __UCLIBC__
-+#undef HAS_RES_NINIT
-+#endif
-+
-+#ifndef HAS_RES_NINIT
- AST_MUTEX_DEFINE_STATIC(res_lock);
- #if 0
- #warning "Warning, res_ninit is missing... Could have reentrancy issues"
-diff -ruN asterisk-1.0.7-orig/res/Makefile asterisk-1.0.7-2/res/Makefile
---- asterisk-1.0.7-orig/res/Makefile 2004-07-17 22:58:01.000000000 +0200
-+++ asterisk-1.0.7-2/res/Makefile 2005-03-19 17:58:17.000000000 +0100
-@@ -13,9 +13,9 @@
-
- MODS=res_adsi.so res_features.so res_crypto.so res_musiconhold.so res_indications.so res_monitor.so \
- res_agi.so
--MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
--MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
--MODS+=$(shell if [ -f "/usr/include/osp/osp.h" ]; then echo "res_osp.so"; fi)
-+#MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
-+#MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
-+#MODS+=$(shell if [ -f "/usr/include/osp/osp.h" ]; then echo "res_osp.so"; fi)
-
- CRYPTO_LIBS=-lssl -lcrypto
-
-diff -ruN asterisk-1.0.7-orig/stdtime/Makefile asterisk-1.0.7-2/stdtime/Makefile
---- asterisk-1.0.7-orig/stdtime/Makefile 2003-11-05 07:19:41.000000000 +0100
-+++ asterisk-1.0.7-2/stdtime/Makefile 2005-03-19 17:38:06.000000000 +0100
-@@ -3,8 +3,8 @@
- all: libtime.a
-
- libtime.a: $(OBJS)
-- ar rv $@ $(OBJS)
-- ranlib $@
-+ $(AR) rv $@ $(OBJS)
-+ $(RANLIB) $@
-
- install:
-
-diff -urN asterisk-1.0.7.old/codecs/Makefile asterisk-1.0.7/codecs/Makefile
---- asterisk-1.0.7.old/codecs/Makefile 2005-04-10 19:40:28.000000000 +0200
-+++ asterisk-1.0.7/codecs/Makefile 2005-04-10 19:51:15.000000000 +0200
-@@ -19,7 +19,6 @@
- #MODG723=codec_g723_1.so codec_g723_1b.so
- #MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so")
- #MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
--MODSPEEX=codec_speex.so
- MODILBC=$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so")
- CFLAGS+=-fPIC
- #CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include")
+++ /dev/null
---- asterisk-1.0.7.old/res/Makefile 2005-04-25 20:53:11.000000000 +0200
-+++ asterisk-1.0.7/res/Makefile 2005-04-25 20:53:26.000000000 +0200
-@@ -11,7 +11,7 @@
- # the GNU General Public License
- #
-
--MODS=res_adsi.so res_features.so res_crypto.so res_musiconhold.so res_indications.so res_monitor.so \
-+MODS=res_adsi.so res_features.so res_musiconhold.so res_indications.so res_monitor.so \
- res_agi.so
- #MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
- #MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
+++ /dev/null
-diff -urN asterisk-1.0.7.old/astman/Makefile asterisk-1.0.7.dev/astman/Makefile
---- asterisk-1.0.7.old/astman/Makefile 2004-06-26 21:25:39.000000000 +0200
-+++ asterisk-1.0.7.dev/astman/Makefile 2005-04-29 15:54:53.000000000 +0200
-@@ -8,7 +8,7 @@
- CFLAGS+=-I/usr/local/include -L/usr/local/lib
- endif
-
--TARGET=$(shell if [ -f /usr/include/newt.h ]; then echo "astman"; else if [ -f /usr/local/include/newt.h ]; then echo "astman"; else echo "none" ; fi ; fi)
-+TARGET=none
- all: depend $(TARGET)
-
- install: