Freeswitch-branches
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- 1655 discussions
Author: mishehu
Date: Mon Jul 10 18:42:22 2006
New Revision: 1821
Added:
freeswitch/branches/mishehu/scripts/fsxs.in
- copied unchanged from r1820, /freeswitch/trunk/scripts/fsxs.in
freeswitch/branches/mishehu/src/mod/applications/mod_conference/
- copied from r1820, /freeswitch/trunk/src/mod/applications/mod_conference/
freeswitch/branches/mishehu/src/mod/applications/mod_conference/mod_conference.c
- copied unchanged from r1820, /freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
freeswitch/branches/mishehu/src/mod/applications/mod_conference/mod_conference.vcproj
- copied unchanged from r1820, /freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.vcproj
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/README
Removed:
freeswitch/branches/mishehu/fsxs.in
Modified:
freeswitch/branches/mishehu/Makefile.am
freeswitch/branches/mishehu/Makefile.in
freeswitch/branches/mishehu/conf/freeswitch.xml
freeswitch/branches/mishehu/modules.conf.in
freeswitch/branches/mishehu/src/include/switch_core.h
freeswitch/branches/mishehu/src/include/switch_loadable_module.h
freeswitch/branches/mishehu/src/include/switch_module_interfaces.h
freeswitch/branches/mishehu/src/include/switch_types.h
freeswitch/branches/mishehu/src/mod/applications/mod_rss/mod_rss.c
freeswitch/branches/mishehu/src/mod/codecs/mod_g711/mod_g711.c
freeswitch/branches/mishehu/src/mod/codecs/mod_g729/mod_g729.c
freeswitch/branches/mishehu/src/mod/codecs/mod_gsm/mod_gsm.c
freeswitch/branches/mishehu/src/mod/codecs/mod_ilbc/mod_ilbc.c
freeswitch/branches/mishehu/src/mod/codecs/mod_l16/mod_l16.c
freeswitch/branches/mishehu/src/mod/codecs/mod_speex/mod_speex.c
freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.c
freeswitch/branches/mishehu/src/mod/endpoints/mod_iax/mod_iax.c
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/anthmcdr.cpp
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/anthmcdr.h
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.cpp
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.h
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/baseregistry.cpp
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/baseregistry.h
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.cpp
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.h
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/csvcdr.cpp
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/csvcdr.h
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/mod_cdr.cpp
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/mysqlcdr.cpp
freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/mysqlcdr.h
freeswitch/branches/mishehu/src/switch.c
freeswitch/branches/mishehu/src/switch_channel.c
freeswitch/branches/mishehu/src/switch_core.c
freeswitch/branches/mishehu/src/switch_loadable_module.c
freeswitch/branches/mishehu/w32/vsnet/Freeswitch.sln
Log:
Added some documentation and filled in the descriptions at the top of all files. Merged to trunk r1820.
Modified: freeswitch/branches/mishehu/Makefile.am
==============================================================================
--- freeswitch/branches/mishehu/Makefile.am (original)
+++ freeswitch/branches/mishehu/Makefile.am Mon Jul 10 18:42:22 2006
@@ -124,7 +124,7 @@
src/include/switch_xml.h
BUILT_SOURCES = version depends
-CLEANFILES = src/include/switch_version.h fsxs
+CLEANFILES = src/include/switch_version.h scripts/fsxs
lib_LTLIBRARIES = libfreeswitch.la
@@ -134,7 +134,7 @@
nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h
bin_PROGRAMS = freeswitch
-bin_SCRIPTS = fsxs
+bin_SCRIPTS = scripts/fsxs
freeswitch_SOURCES = src/switch.c\
src/include/switch_version.h
freeswitch_CFLAGS = $(AM_CFLAGS)
@@ -234,7 +234,7 @@
dox:
cd docs && doxygen $(PWD)/docs/Doxygen.conf
-fsxs: fsxs.in
+scripts/fsxs: scripts/fsxs.in
@echo creating fsxs
@sed -e "s,@MODULES_DIR\@,$(PREFIX)/mod," \
-e "s,@LIB_DIR\@,$(PREFIX)/lib," \
@@ -253,7 +253,7 @@
-e "s|@SOLINK\@|$(SOLINK)|" \
-e "s|@LDFLAGS\@|-L$(PREFIX)/lib|" \
-e "s|@LIBS\@|-lfreeswitch|" \
- fsxs.in > fsxs
+ scripts/fsxs.in > scripts/fsxs
eclean: clean
rm -f `find . -type f -name \*~`
Modified: freeswitch/branches/mishehu/Makefile.in
==============================================================================
--- freeswitch/branches/mishehu/Makefile.in (original)
+++ freeswitch/branches/mishehu/Makefile.in Mon Jul 10 18:42:22 2006
@@ -16,6 +16,7 @@
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -70,7 +71,7 @@
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
- "$(DESTDIR)$(library_includedir)"
+ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(library_includedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libfreeswitch_la_DEPENDENCIES =
@@ -95,6 +96,8 @@
am_freeswitch_OBJECTS = freeswitch-switch.$(OBJEXT)
freeswitch_OBJECTS = $(am_freeswitch_OBJECTS)
freeswitch_DEPENDENCIES = ${top_builddir}/libfreeswitch.la
+binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(bin_SCRIPTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include
depcomp = $(SHELL) $(top_srcdir)/build/config/depcomp
am__depfiles_maybe = depfiles
@@ -339,12 +342,13 @@
src/include/switch_xml.h
BUILT_SOURCES = version depends
-CLEANFILES = src/include/switch_version.h
+CLEANFILES = src/include/switch_version.h scripts/fsxs
lib_LTLIBRARIES = libfreeswitch.la
libfreeswitch_la_CFLAGS = $(AM_CFLAGS) -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -std=c99
libfreeswitch_la_LDFLAGS = -version-info 1:0:0
libfreeswitch_la_LIBADD = -lteletone -lresample -lsrtp -lsqlite3 -lspeakup
nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h
+bin_SCRIPTS = scripts/fsxs
freeswitch_SOURCES = src/switch.c\
src/include/switch_version.h
@@ -467,7 +471,26 @@
freeswitch$(EXEEXT): $(freeswitch_OBJECTS) $(freeswitch_DEPENDENCIES)
@rm -f freeswitch$(EXEEXT)
$(LINK) $(freeswitch_LDFLAGS) $(freeswitch_OBJECTS) $(freeswitch_LDADD) $(LIBS)
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
+ else :; fi; \
+ done
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -935,12 +958,12 @@
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(HEADERS)
install-binPROGRAMS: install-libLTLIBRARIES
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(library_includedir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(library_includedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: $(BUILT_SOURCES)
@@ -994,7 +1017,8 @@
install-data-am: install-library_includeHEADERS
-install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
+install-exec-am: install-binPROGRAMS install-binSCRIPTS \
+ install-libLTLIBRARIES
install-info: install-info-recursive
@@ -1022,8 +1046,9 @@
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
- uninstall-libLTLIBRARIES uninstall-library_includeHEADERS
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ uninstall-info-am uninstall-libLTLIBRARIES \
+ uninstall-library_includeHEADERS
uninstall-info: uninstall-info-recursive
@@ -1035,16 +1060,16 @@
distclean-generic distclean-hdr distclean-libtool \
distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-libLTLIBRARIES \
+ install install-am install-binPROGRAMS install-binSCRIPTS \
+ install-data install-data-am install-exec install-exec-am \
+ install-info install-info-am install-libLTLIBRARIES \
install-library_includeHEADERS install-man install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-info-am \
+ uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-info-am \
uninstall-libLTLIBRARIES uninstall-library_includeHEADERS
@@ -1137,6 +1162,27 @@
dox:
cd docs && doxygen $(PWD)/docs/Doxygen.conf
+
+scripts/fsxs: scripts/fsxs.in
+ @echo creating fsxs
+ @sed -e "s,@MODULES_DIR\@,$(PREFIX)/mod," \
+ -e "s,@LIB_DIR\@,$(PREFIX)/lib," \
+ -e "s,@BIN_DIR\@,$(PREFIX)/bin," \
+ -e "s,@INC_DIR\@,$(PREFIX)/include," \
+ -e "s,@CFG_DIR\@,$(PREFIX)/conf," \
+ -e "s,@DB_DIR\@,$(PREFIX)/db," \
+ -e "s,@PREFIX\@,$(PREFIX)," \
+ -e "s,@CC\@,$(CC)," \
+ -e "s,@LD\@,$(CC)," \
+ -e "s,@INSTALL\@,$(INSTALL)," \
+ -e "s,@MKINSTALLDIRS\@,$(mkdir_p)," \
+ \
+ -e "s|@CFLAGS\@|$(CFLAGS) -fPIC $(shell $(APR_CONFIG) --cflags --cppflags)|" \
+ -e "s|@INCLUDES\@|-I$(PREFIX)/include $(shell $(APR_CONFIG) --includes) $(shell $(APU_CONFIG) --includes)|" \
+ -e "s|@SOLINK\@|$(SOLINK)|" \
+ -e "s|@LDFLAGS\@|-L$(PREFIX)/lib|" \
+ -e "s|@LIBS\@|-lfreeswitch|" \
+ scripts/fsxs.in > scripts/fsxs
eclean: clean
rm -f `find . -type f -name \*~`
Modified: freeswitch/branches/mishehu/conf/freeswitch.xml
==============================================================================
--- freeswitch/branches/mishehu/conf/freeswitch.xml (original)
+++ freeswitch/branches/mishehu/conf/freeswitch.xml Mon Jul 10 18:42:22 2006
@@ -1,13 +1,19 @@
<?xml version="1.0"?>
<document type="freeswitch/xml">
<section name="configuration" description="Various Configuration">
+ <configuration name="switch.conf" description="Modules">
+ <settings>
+ <!--Most channels to allow at once -->
+ <param name="max-sessions" value="1000"/>
+ </settings>
+ </configuration>
<configuration name="modules.conf" description="Modules">
<modules>
<!-- Loggers (I'd load these first) -->
<load module="mod_console"/>
<!-- <load module="mod_syslog"/> -->
- <!-- XML Interfaces -->
+ <!-- XML Interfaces -->
<!-- <load module="mod_xml_rpc"/> -->
<!-- Event Handlers -->
@@ -59,6 +65,10 @@
<!-- ASR /TTS -->
<!-- <load module="mod_cepstral"/> -->
<!-- <load module="mod_rss"/> -->
+
+ <!-- Conference Bridges -->
+ <!--<load module="mod_conference"/>-->
+
</modules>
</configuration>
@@ -68,7 +78,7 @@
<!-- <param name="ip" value="1.2.3.4"> -->
<param name="port" value="4569"/>
<param name="dialplan" value="XML"/>
- <param name="codec-prefs" value="PCMU,PCMA,speex,L16"/>
+ <param name="codec-prefs" value="PCMU@20,PCMA,speex,L16"/>
<param name="codec-master" value="us"/>
<param name="codec-rates" value="8"/>
</settings>
@@ -106,13 +116,15 @@
<param name="port" value="5060"/>
<param name="dialplan" value="XML"/>
<param name="dtmf-duration" value="100"/>
- <param name="codec-prefs" value="PCMU,PCMA"/>
- <!-- Payload number to bind DTMF to-->
+ <!-- the @20 is optional number of ms you want to use. Use it only
+ if you know the codec supports it -->
+ <param name="codec-prefs" value="PCMU@20,PCMA@20"/>
+ <!-- Payload number to bind DTMF to-->
<param name="rfc2833-pt" value="101"/>
- <!-- disable to trade async for more calls -->
- <param name="use-rtp-timer" value="true"/>
- <!-- auto sense NAT issues and adjust accordingly -->
- <param name="use-rtp-auto-adjust" value="true"/>
+ <!-- disable to trade async for more calls -->
+ <param name="use-rtp-timer" value="true"/>
+ <!-- auto sense NAT issues and adjust accordingly -->
+ <param name="use-rtp-auto-adjust" value="true"/>
<!-- pick one (default if not specified is 'guess'); -->
<param name="rtp-ip" value="guess"/>
<!-- <param name-"rtp-ip" value="10.0.0.1"/> -->
@@ -228,8 +240,8 @@
<param name="message" value="Jingle all the way"/>
<param name="rtp-ip" value="10.0.0.1"/>
<param name="auto-login" value="true"/>
- <!-- disable to trade async for more calls -->
- <param name="use-rtp-timer" value="true"/>
+ <!-- disable to trade async for more calls -->
+ <param name="use-rtp-timer" value="true"/>
<!-- or -->
<!-- <param name="rtp-ip" value="my_lan_ip"/> -->
<!-- <param name="ext-rtp-ip" value="stun:stun.server.com"/> -->
@@ -243,16 +255,16 @@
</configuration>
<configuration name="xml_rpc.conf" description="XML RPC">
<settings>
- <!-- The port where you want to run the http service (default 8080) -->
- <param name="http-port" value="8080"/>
- <!-- if all 3 of the following params exist all http traffic will require auth -->
+ <!-- The port where you want to run the http service (default 8080) -->
+ <param name="http-port" value="8080"/>
+ <!-- if all 3 of the following params exist all http traffic will require auth -->
<param name="auth-realm" value="freeswitch"/>
<param name="auth-user" value="freeswitch"/>
<param name="auth-pass" value="works"/>
<!-- The url to a gateway cgi that can generate xml similar to
what's in this file only on-the-fly (leave it commented if you dont
need it) -->
- <!-- one or more |-delim of configuration|directory|dialplan -->
+ <!-- one or more |-delim of configuration|directory|dialplan -->
<!-- <param name="gateway-url" value="http://www.server.com/gateway.cgi" bindings="configuration"/> -->
</settings>
</configuration>
@@ -265,6 +277,61 @@
</feeds>
</configuration>
+ <!-- None of these paths are real if you want any of these options
+ you need to really set them up -->
+ <configuration name="conference.conf" description="Audio Conference">
+ <!-- Profiles are collections of settings you can reference by name. -->
+
+ <profiles>
+ <profile name="default">
+ <!-- Sample Rate-->
+ <param name="rate" value="8000"/>
+ <!-- Number of milliseconds per frame -->
+ <param name="interval" value="20"/>
+ <!-- Energy level required for audio to be sent to the other users -->
+ <param name="energy-level" value="300"/>
+ <!-- TTS Engine to use -->
+ <!--<param name="tts-engine" value="cepstral"/>-->
+ <!-- TTS Voice to use -->
+ <!--<param name="tts-voice" value="david"/>-->
+
+ <!-- If TTS is enabled all audio-file params not beginning with '/'
+ will be considered text to say with TTS -->
+
+ <!-- File to play to acknowledge succees -->
+ <!--<param name="ack-sound" value="/soundfiles/beep.wav"/>-->
+ <!-- File to play to acknowledge failure -->
+ <!--<param name="nack-sound" value="/soundfiles/beeperr.wav"/>-->
+ <!-- File to play to acknowledge muted -->
+ <!--<param name="muted-sound" value="/soundfiles/muted.wav"/>-->
+ <!-- File to play to acknowledge unmuted -->
+ <!--<param name="unmuted-sound" value="/soundfiles/unmuted.wav"/>-->
+ <!-- File to play if you are alone in the conference -->
+ <!--<param name="alone-sound" value="/soundfiles/yactopitc.wav"/>-->
+ <!-- File to play when you join the conference -->
+ <!--<param name="enter-sound" value="/soundfiles/welcome.wav"/>-->
+ <!-- File to play when you leave the conference -->
+ <!--<param name="exit-sound" value="/soundfiles/exit.wav"/>-->
+ <!-- File to play when you ae ejected from the conference -->
+ <!--<param name="kicked-sound" value="/soundfiles/kicked.wav"/>-->
+ <!-- File to play when the conference is locked -->
+ <!--<param name="locked-sound" value="/soundfiles/locked.wav"/>-->
+ <!-- File to play to prompt for a pin -->
+ <!--<param name="pin-sound" value="/soundfiles/pin.wav"/>-->
+ <!-- File to play to when the pin is invalid -->
+ <!--<param name="bad-pin-sound" value="/soundfiles/invalid-pin.wav"/>-->
+ <!-- Conference pin -->
+ <!--<param name="pin" value="12345"/>-->
+ <!-- Default Caller ID Name for outbound calls -->
+ <param name="caller-id-name" value="FreeSWITCH"/>
+ <!-- Default Caller ID Number for outbound calls -->
+ <param name="caller-id-number" value="8777423583"/>
+ </profile>
+ </profiles>
+ <rooms>
+ <room name="freeswitch" profile="default"/>
+ </rooms>
+ </configuration>
</section>
<section name="dialplan" description="Regex/XML Dialplan">
<!-- Valid fields in conditions:
@@ -274,18 +341,32 @@
<!-- *NOTE* The special context name 'any' will match any context -->
<context name="default">
- <extension name="tollfree">
- <condition field="destination_number" expression="^(18[0{2}8{2}7{2}6{2}]\d{7})">
- <action application="bridge" data="exosip/$1-freeswitch(a)voip.trxtel.com"/>
- </condition>
- </extension>
+ <extension name="tollfree">
+ <condition field="destination_number" expression="^(18[0{2}8{2}7{2}6{2}]\d{7})">
+ <action application="bridge" data="exosip/$1-freeswitch(a)voip.trxtel.com"/>
+ </condition>
+ </extension>
- <extension name="devconf">
- <condition field="destination_number" expression="^888$">
- <action application="bridge" data="exosip/888(a)66.250.68.194"/>
- </condition>
- </extension>
+ <extension name="devconf">
+ <condition field="destination_number" expression="^888$">
+ <action application="bridge" data="exosip/888(a)66.250.68.194"/>
+ </condition>
+ </extension>
+ <!-- Enter an existing conference -->
+ <extension name="1000">
+ <condition field="destination_number" expression="^1000$">
+ <action application="conference" data="freeswitch"/>
+ </condition>
+ </extension>
+
+ <!-- Start a dynamic conference and call someone at the same time -->
+ <extension name="2000">
+ <condition field="destination_number" expression="^2000$">
+ <action application="conference" data="bridge:mydynaconf:exosip/1234@66.250.68.194"/>
+ </condition>
+ </extension>
+
<!-- if the destination is an exact match on the extension name
you do not need any regex in the condition -->
<extension name="999">
@@ -294,30 +375,30 @@
<!-- extensions starting with 4, all the numbers after 4 form a numeric filename
continue=true means keep looking for more extensions to match
*NOTE* The entire dialplan is parsed ONCE when the call starts
- so any call info acquired after the various actions cannot
- be taken into consideration.
+ so any call info acquired after the various actions cannot
+ be taken into consideration.
- The first match will play a beep and the second one plays
- the desired file. This is for demo purposes both actions
- could have been under the same <extension> tag as well.
- -->
+ The first match will play a beep and the second one plays
+ the desired file. This is for demo purposes both actions
+ could have been under the same <extension> tag as well.
+ -->
<extension name="playsound1" continue="true">
<condition field="source" expression="mod_exosip"/>
<condition field="destination_number" expression="^4(\d+)">
<action application="playback" data="/var/sounds/beep.gsm"/>
- </condition>
+ </condition>
</extension>
<extension name="playsound2">
<condition field="source" expression="mod_exosip"/>
<condition field="destination_number" expression="^4(\d+)">
<action application="playback" data="/root/$1.raw"/>
- </condition>
+ </condition>
</extension>
<!-- send everything with a certian RDNIS to Wanpipe ISDN -->
<extension name="To PRI">
<condition field="rdnis" expression="8881231234"/>
<condition field="destination_number" expression="(.*)">
- <action application="bridge" data="wanpipe/a/a/$1"/>
+ <action application="bridge" data="wanpipe/a/a/$1"/>
</condition>
</extension>
<!-- Call *MUST* originate from mod_iax and also be dialing ext 9999-->
Modified: freeswitch/branches/mishehu/modules.conf.in
==============================================================================
--- freeswitch/branches/mishehu/modules.conf.in (original)
+++ freeswitch/branches/mishehu/modules.conf.in Mon Jul 10 18:42:22 2006
@@ -1,6 +1,7 @@
loggers/mod_console
loggers/mod_syslog
applications/mod_commands
+applications/mod_conference
applications/mod_bridgecall
applications/mod_echo
applications/mod_ivrtest
Modified: freeswitch/branches/mishehu/src/include/switch_core.h
==============================================================================
--- freeswitch/branches/mishehu/src/include/switch_core.h (original)
+++ freeswitch/branches/mishehu/src/include/switch_core.h Mon Jul 10 18:42:22 2006
@@ -117,6 +117,13 @@
SWITCH_DECLARE(switch_status_t) switch_core_init(char *console, const char **err);
/*!
+ \brief Set/Get Session Limit
+ \param new new value (if > 0)
+ \return the current session limit
+*/
+SWITCH_DECLARE(uint32_t) switch_core_session_limit(uint32_t new);
+
+/*!
\brief Destroy the core
\note to be called at application shutdown
*/
@@ -308,6 +315,11 @@
\note if the session was located it will have a read lock obtained which will need to be released with switch_core_session_rwunlock()
*/
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_locate(char *uuid_str);
+
+/*!
+ \brief Hangup All Sessions
+*/
+SWITCH_DECLARE(void) switch_core_session_hupall(void);
/*!
\brief Send a message to another session using it's uuid
Modified: freeswitch/branches/mishehu/src/include/switch_loadable_module.h
==============================================================================
--- freeswitch/branches/mishehu/src/include/switch_loadable_module.h (original)
+++ freeswitch/branches/mishehu/src/include/switch_loadable_module.h Mon Jul 10 18:42:22 2006
@@ -171,10 +171,10 @@
\param arraylen the max size in elements of the array
\return the number of elements added to the array
*/
-SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool,
- switch_codec_interface_t **array,
+SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, const switch_codec_implementation_t **array,
int arraylen);
+
/*!
\brief Retrieve the list of loaded codecs into an array based on another array showing the sorted order
\param array the array to populate
@@ -184,10 +184,8 @@
\return the number of elements added to the array
\note this function only considers codecs that are listed in the "prefs" array and ignores the rest.
*/
-SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(switch_codec_interface_t **array,
- int arraylen,
- char **prefs,
- int preflen);
+SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_implementation_t **array,
+ int arraylen, char **prefs, int preflen);
/*!
\brief Execute a registered API command
Modified: freeswitch/branches/mishehu/src/include/switch_module_interfaces.h
==============================================================================
--- freeswitch/branches/mishehu/src/include/switch_module_interfaces.h (original)
+++ freeswitch/branches/mishehu/src/include/switch_module_interfaces.h Mon Jul 10 18:42:22 2006
@@ -444,6 +444,8 @@
/*! \brief A table of settings and callbacks that define a paticular implementation of a codec */
struct switch_codec_implementation {
+ /*! enumeration defining the type of the codec */
+ const switch_codec_type_t codec_type;
/*! the IANA code number */
switch_payload_t ianacode;
/*! the IANA code name */
@@ -497,8 +499,6 @@
struct switch_codec_interface {
/*! the name of the interface */
const char *interface_name;
- /*! enumeration defining the type of the codec */
- const switch_codec_type_t codec_type;
/*! a list of codec implementations related to the codec */
const switch_codec_implementation_t *implementations;
const struct switch_codec_interface *next;
Modified: freeswitch/branches/mishehu/src/include/switch_types.h
==============================================================================
--- freeswitch/branches/mishehu/src/include/switch_types.h (original)
+++ freeswitch/branches/mishehu/src/include/switch_types.h Mon Jul 10 18:42:22 2006
@@ -619,7 +619,8 @@
SWITCH_CAUSE_MANDATORY_IE_LENGTH_ERROR = 103,
SWITCH_CAUSE_PROTOCOL_ERROR = 111,
SWITCH_CAUSE_INTERWORKING = 127,
- SWITCH_CAUSE_CRASH = 500
+ SWITCH_CAUSE_CRASH = 500,
+ SWITCH_CAUSE_SYSTEM_SHUTDOWN = 501
} switch_call_cause_t;
Modified: freeswitch/branches/mishehu/src/mod/applications/mod_rss/mod_rss.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_rss/mod_rss.c (original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_rss/mod_rss.c Mon Jul 10 18:42:22 2006
@@ -602,15 +602,17 @@
cont = 0;
continue;
}
-
- status = switch_ivr_speak_text_handle(session,
- &sh,
- &speech_codec,
- timerp,
- on_dtmf,
- entries[dtb.index].description_txt,
- &dtb,
- sizeof(dtb));
+
+ if (entries[dtb.index].description_txt) {
+ status = switch_ivr_speak_text_handle(session,
+ &sh,
+ &speech_codec,
+ timerp,
+ on_dtmf,
+ entries[dtb.index].description_txt,
+ &dtb,
+ sizeof(dtb));
+ }
if (status == SWITCH_STATUS_BREAK) {
continue;
} else if (status != SWITCH_STATUS_SUCCESS) {
Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_g711/mod_g711.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_g711/mod_g711.c (original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_g711/mod_g711.c Mon Jul 10 18:42:22 2006
@@ -190,6 +190,7 @@
#if 0
static const switch_codec_implementation_t g711u_8k_60ms_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 0,
/*.iananame */ "PCMU",
/*.samples_per_second */ 8000,
@@ -206,9 +207,10 @@
/*.decode */ switch_g711u_decode,
/*.destroy */ switch_g711u_destroy
};
+#endif
-
static const switch_codec_implementation_t g711u_8k_30ms_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 0,
/*.iananame */ "PCMU",
/*.samples_per_second */ 8000,
@@ -224,11 +226,11 @@
/*.encode */ switch_g711u_encode,
/*.decode */ switch_g711u_decode,
/*.destroy */ switch_g711u_destroy,
- /*.next */ &g711u_8k_60ms_implementation
+ /*.next */ NULL
};
-#endif
static const switch_codec_implementation_t g711u_16k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 0,
/*.iananame */ "PCMU",
/*.samples_per_second */ 16000,
@@ -244,9 +246,11 @@
/*.encode */ switch_g711u_encode,
/*.decode */ switch_g711u_decode,
/*.destroy */ switch_g711u_destroy,
+ /*.next */ &g711u_8k_30ms_implementation
};
static const switch_codec_implementation_t g711u_8k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 0,
/*.iananame */ "PCMU",
/*.samples_per_second */ 8000,
@@ -267,6 +271,7 @@
static const switch_codec_implementation_t g711a_8k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 8,
/*.iananame */ "PCMA",
/*.samples_per_second */ 8000,
@@ -287,13 +292,11 @@
static const switch_codec_interface_t g711a_codec_interface = {
/*.interface_name */ "g711 alaw",
- /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.implementations */ &g711a_8k_implementation
};
static const switch_codec_interface_t g711u_codec_interface = {
/*.interface_name */ "g711 ulaw",
- /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.implementations */ &g711u_8k_implementation,
/*.next */ &g711a_codec_interface
};
Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_g729/mod_g729.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_g729/mod_g729.c (original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_g729/mod_g729.c Mon Jul 10 18:42:22 2006
@@ -219,6 +219,7 @@
/* Registration */
static const switch_codec_implementation_t g729_10ms_8k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 18,
/*.iananame */ "G729",
/*.samples_per_second */ 8000,
@@ -237,6 +238,7 @@
};
static const switch_codec_implementation_t g729_8k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 18,
/*.iananame */ "G729",
/*.samples_per_second */ 8000,
@@ -258,7 +260,6 @@
static const switch_codec_interface_t g729_codec_interface = {
/*.interface_name */ "g729",
- /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.implementations */ &g729_8k_implementation,
};
Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_gsm/mod_gsm.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_gsm/mod_gsm.c (original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_gsm/mod_gsm.c Mon Jul 10 18:42:22 2006
@@ -133,6 +133,7 @@
/* Registration */
static const switch_codec_implementation_t gsm_8k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 3,
/*.iananame */ "gsm",
/*.samples_per_second */ 8000,
@@ -151,7 +152,6 @@
};
static const switch_codec_interface_t gsm_codec_interface = {
/*.interface_name */ "gsm",
- /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.implementations */ &gsm_8k_implementation,
};
static switch_loadable_module_interface_t gsm_module_interface = {
Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_ilbc/mod_ilbc.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_ilbc/mod_ilbc.c (original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_ilbc/mod_ilbc.c Mon Jul 10 18:42:22 2006
@@ -186,6 +186,7 @@
/* Registration */
static const switch_codec_implementation_t ilbc_8k_30ms_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 97,
/*.iananame */ "iLBC",
/*.samples_per_second */ 8000,
@@ -204,6 +205,7 @@
};
static const switch_codec_implementation_t ilbc_8k_20ms_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 97,
/*.iananame */ "iLBC",
/*.samples_per_second */ 8000,
@@ -225,6 +227,7 @@
static const switch_codec_implementation_t ilbc_102_8k_30ms_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 102,
/*.iananame */ "iLBC",
/*.samples_per_second */ 8000,
@@ -243,6 +246,7 @@
};
static const switch_codec_implementation_t ilbc_102_8k_20ms_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 102,
/*.iananame */ "iLBC102",
/*.samples_per_second */ 8000,
@@ -263,6 +267,7 @@
static const switch_codec_implementation_t ilbc_8k_20ms_nonext_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 97,
/*.iananame */ "iLBC20ms",
/*.samples_per_second */ 8000,
@@ -283,20 +288,17 @@
static const switch_codec_interface_t ilbc_20ms_codec_interface = {
/*.interface_name */ "ilbc",
- /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.implementations */ &ilbc_8k_20ms_nonext_implementation
};
static const switch_codec_interface_t ilbc_102_codec_interface = {
/*.interface_name */ "ilbc",
- /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.implementations */ &ilbc_102_8k_20ms_implementation,
/*.next*/ &ilbc_20ms_codec_interface
};
static const switch_codec_interface_t ilbc_codec_interface = {
/*.interface_name */ "ilbc",
- /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.implementations */ &ilbc_8k_20ms_implementation,
/*.next*/ &ilbc_102_codec_interface
};
Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_l16/mod_l16.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_l16/mod_l16.c (original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_l16/mod_l16.c Mon Jul 10 18:42:22 2006
@@ -90,6 +90,7 @@
}
static const switch_codec_implementation_t raw_32k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.samples_per_second = */ 32000,
@@ -108,6 +109,7 @@
};
static const switch_codec_implementation_t raw_22k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.samples_per_second = */ 22050,
@@ -127,6 +129,7 @@
};
static const switch_codec_implementation_t raw_16k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.samples_per_second = */ 16000,
@@ -146,6 +149,7 @@
};
static const switch_codec_implementation_t raw_8k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.samples_per_second = */ 8000,
@@ -166,6 +170,7 @@
static const switch_codec_implementation_t raw_8k_30ms_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.samples_per_second */ 8000,
@@ -186,6 +191,7 @@
static const switch_codec_implementation_t raw_8k_60ms_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.samples_per_second */ 8000,
@@ -205,6 +211,7 @@
};
static const switch_codec_implementation_t raw_8k_120ms_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.samples_per_second */ 8000,
@@ -226,7 +233,6 @@
static const switch_codec_interface_t raw_codec_interface = {
/*.interface_name */ "raw signed linear (16 bit)",
- /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.implementations */ &raw_8k_120ms_implementation
};
Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_speex/mod_speex.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_speex/mod_speex.c (original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_speex/mod_speex.c Mon Jul 10 18:42:22 2006
@@ -268,6 +268,7 @@
/* Registration */
static const switch_codec_implementation_t speex_32k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 98,
/*.iananame */ "speex",
/*.samples_per_second */ 32000,
@@ -286,6 +287,7 @@
};
static const switch_codec_implementation_t speex_16k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 98,
/*.iananame */ "speex",
/*.samples_per_second */ 16000,
@@ -305,6 +307,7 @@
};
static const switch_codec_implementation_t speex_8k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 98,
/*.iananame */ "speex",
/*.samples_per_second */ 8000,
@@ -325,7 +328,6 @@
static const switch_codec_interface_t speex_codec_interface = {
/*.interface_name */ "speex",
- /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.implementations */ &speex_8k_implementation
};
Modified: freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.c Mon Jul 10 18:42:22 2006
@@ -113,7 +113,7 @@
switch_caller_profile_t *caller_profile;
unsigned short samprate;
switch_mutex_t *mutex;
- switch_codec_interface_t *codecs[SWITCH_MAX_CODECS];
+ const switch_codec_implementation_t *codecs[SWITCH_MAX_CODECS];
unsigned int num_codecs;
int codec_index;
switch_rtp_t *rtp_session;
@@ -440,16 +440,16 @@
if (force || !switch_test_flag(tech_pvt, TFLAG_CODEC_READY)) {
if (tech_pvt->codec_index < 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Don't have my codec yet here's one\n");
- tech_pvt->codec_name = lame(tech_pvt->codecs[0]->implementations->iananame);
- tech_pvt->codec_num = tech_pvt->codecs[0]->implementations->ianacode;
+ tech_pvt->codec_name = lame(tech_pvt->codecs[0]->iananame);
+ tech_pvt->codec_num = tech_pvt->codecs[0]->ianacode;
tech_pvt->codec_index = 0;
- payloads[0].name = lame(tech_pvt->codecs[0]->implementations->iananame);
- payloads[0].id = tech_pvt->codecs[0]->implementations->ianacode;
+ payloads[0].name = lame(tech_pvt->codecs[0]->iananame);
+ payloads[0].id = tech_pvt->codecs[0]->ianacode;
} else {
- payloads[0].name = lame(tech_pvt->codecs[tech_pvt->codec_index]->implementations->iananame);
- payloads[0].id = tech_pvt->codecs[tech_pvt->codec_index]->implementations->ianacode;
+ payloads[0].name = lame(tech_pvt->codecs[tech_pvt->codec_index]->iananame);
+ payloads[0].id = tech_pvt->codecs[tech_pvt->codec_index]->ianacode;
}
@@ -1546,22 +1546,22 @@
for(x = 0; x < len; x++) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Available Payload %s %u\n", payloads[x].name, payloads[x].id);
for(y = 0; y < tech_pvt->num_codecs; y++) {
- char *name = tech_pvt->codecs[y]->implementations->iananame;
+ char *name = tech_pvt->codecs[y]->iananame;
if (!strncasecmp(name, "ilbc", 4)) {
name = "ilbc";
}
- if (tech_pvt->codecs[y]->implementations->ianacode > 96) {
+ if (tech_pvt->codecs[y]->ianacode > 96) {
match = strcasecmp(name, payloads[x].name) ? 0 : 1;
} else {
- match = (payloads[x].id == tech_pvt->codecs[y]->implementations->ianacode) ? 1 : 0;
+ match = (payloads[x].id == tech_pvt->codecs[y]->ianacode) ? 1 : 0;
}
if (match) {
tech_pvt->codec_index = y;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Choosing Payload index %u %s %u\n", y, payloads[x].name, payloads[x].id);
- tech_pvt->codec_name = tech_pvt->codecs[y]->implementations->iananame;
- tech_pvt->codec_num = tech_pvt->codecs[y]->implementations->ianacode;
+ tech_pvt->codec_name = tech_pvt->codecs[y]->iananame;
+ tech_pvt->codec_num = tech_pvt->codecs[y]->ianacode;
if (!switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
do_describe(tech_pvt, 0);
}
Modified: freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.c (original)
+++ freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.c Mon Jul 10 18:42:22 2006
@@ -138,7 +138,7 @@
int ssrc;
switch_time_t last_read;
char *realm;
- switch_codec_interface_t *codecs[SWITCH_MAX_CODECS];
+ const switch_codec_implementation_t *codecs[SWITCH_MAX_CODECS];
int num_codecs;
switch_payload_t te;
switch_mutex_t *flag_mutex;
@@ -173,7 +173,13 @@
static switch_status_t exosip_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id);
static int config_exosip(int reload);
-static switch_status_t parse_sdp_media(struct private_object *tech_pvt, sdp_media_t * media, char **dname, char **drate, char **dpayload);
+static switch_status_t parse_sdp_media(struct private_object *tech_pvt,
+ sdp_media_t * media,
+ char **dname,
+ char **drate,
+ char **dpayload,
+ const switch_codec_implementation_t **impp);
+
static switch_status_t exosip_kill_channel(switch_core_session_t *session, int sig);
static switch_status_t activate_rtp(struct private_object *tech_pvt);
static void deactivate_rtp(struct private_object *tech_pvt);
@@ -356,7 +362,7 @@
static const switch_codec_implementation_t *imp;
for (i = 0; i < tech_pvt->num_codecs; i++) {
- imp = tech_pvt->codecs[i]->implementations;
+ imp = tech_pvt->codecs[i];
while(NULL != imp) {
uint32_t sps = imp->samples_per_second;
@@ -1178,6 +1184,7 @@
char *displayname, *username;
osip_header_t *tedious;
char *val;
+ const switch_codec_implementation_t *imp = NULL;
switch_core_session_add_stream(session, NULL);
if ((tech_pvt = (struct private_object *) switch_core_session_alloc(session, sizeof(struct private_object))) != 0) {
@@ -1310,10 +1317,10 @@
if (tech_pvt->num_codecs > 0) {
int i;
- static const switch_codec_implementation_t *imp;
+ static const switch_codec_implementation_t *imp = NULL;
for (i = 0; i < tech_pvt->num_codecs; i++) {
- for (imp = tech_pvt->codecs[i]->implementations; imp; imp = imp->next) {
+ for (imp = tech_pvt->codecs[i]; imp; imp = imp->next) {
sdp_add_codec(tech_pvt->sdp_config, tech_pvt->codecs[i]->codec_type, imp->ianacode, imp->iananame,
imp->samples_per_second, 0);
@@ -1336,18 +1343,20 @@
if (audio_tab[0] == NULL && video_tab[0] == NULL && t38_tab[0] == NULL && app_tab[0] == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Got no compatible codecs!\n");
- break;
+ goto done;
}
for (pos = 0; audio_tab[pos] != NULL; pos++) {
osip_rfc3264_complete_answer(tech_pvt->sdp_config, remote_sdp, tech_pvt->local_sdp, audio_tab[pos],
mline);
- if (parse_sdp_media(tech_pvt, audio_tab[pos], &dname, &drate, &dpayload) == SWITCH_STATUS_SUCCESS) {
- tech_pvt->payload_num = atoi(dpayload);
- break;
+ if (parse_sdp_media(tech_pvt, audio_tab[pos], &dname, &drate, &dpayload, &imp) == SWITCH_STATUS_SUCCESS) {
+ tech_pvt->payload_num = atoi(dpayload);
+ goto done;
}
}
mline++;
}
+ done:
+
free(remote_sdp_str);
sdp_message_o_origin_set(tech_pvt->local_sdp, "FreeSWITCH", "0", "0", "IN", "IP4", ip);
@@ -1379,6 +1388,12 @@
{
int rate = atoi(drate);
int ms = globals.codec_ms;
+
+
+ if (imp) {
+ ms = imp->microseconds_per_frame / 1000;
+ }
+
if (!strcasecmp(dname, "ilbc")) {
ms = 30;
}
@@ -1485,13 +1500,19 @@
}
-static switch_status_t parse_sdp_media(struct private_object *tech_pvt, sdp_media_t * media, char **dname, char **drate, char **dpayload)
+static switch_status_t parse_sdp_media(struct private_object *tech_pvt,
+ sdp_media_t * media,
+ char **dname,
+ char **drate,
+ char **dpayload,
+ const switch_codec_implementation_t **impp)
{
int pos = 0;
sdp_attribute_t *attr = NULL;
char *name, *payload, *rate;
switch_status_t status = SWITCH_STATUS_GENERR;
char workspace[512];
+ const switch_codec_implementation_t *imp = NULL;
while (osip_list_eol(media->a_attributes, pos) == 0) {
attr = (sdp_attribute_t *) osip_list_get(media->a_attributes, pos);
@@ -1521,11 +1542,9 @@
}
for(i = 0; !match && i < tech_pvt->num_codecs; i++) {
- const switch_codec_implementation_t *imp;
-
-
- for (imp = tech_pvt->codecs[i]->implementations; imp; imp = imp->next) {
+ for (imp = tech_pvt->codecs[i]; imp; imp = imp->next) {
+
if (pt < 97) {
match = (pt == imp->ianacode) ? 1 : 0;
} else {
@@ -1543,9 +1562,10 @@
*dname = strdup(name);
*drate = strdup(rate);
*dpayload = strdup(payload);
+ *impp = imp;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Found negotiated codec Payload: %s Name: %s Rate: %s\n",
*dpayload, *dname, *drate);
- break;
+ return SWITCH_STATUS_SUCCESS;
}
}
@@ -1652,8 +1672,8 @@
struct private_object *tech_pvt;
char *dpayload = NULL, *dname = NULL, *drate = NULL;
switch_channel_t *channel;
+ const switch_codec_implementation_t *imp = NULL;
-
if ((tech_pvt = get_pvt_by_call_id(event->cid)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "cannot answer nonexistant call [%d]!\n", event->cid);
return;
@@ -1684,20 +1704,23 @@
snprintf(tech_pvt->remote_sdp_audio_ip, 50, conn->c_addr);
/* Grab codec elements */
- if (parse_sdp_media(tech_pvt, remote_med, &dname, &drate, &dpayload) == SWITCH_STATUS_SUCCESS) {
+ if (parse_sdp_media(tech_pvt, remote_med, &dname, &drate, &dpayload, &imp) == SWITCH_STATUS_SUCCESS) {
tech_pvt->payload_num = atoi(dpayload);
}
/* Assign them thar IDs */
tech_pvt->did = event->did;
tech_pvt->tid = event->tid;
-
-
{
int rate = atoi(drate);
int ms = globals.codec_ms;
+
if (!strcasecmp(dname, "ilbc")) {
ms = 30;
+ }
+
+ if (imp) {
+ ms = imp->microseconds_per_frame / 1000;
}
if (switch_core_codec_init(&tech_pvt->read_codec,
Modified: freeswitch/branches/mishehu/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/endpoints/mod_iax/mod_iax.c (original)
+++ freeswitch/branches/mishehu/src/mod/endpoints/mod_iax/mod_iax.c Mon Jul 10 18:42:22 2006
@@ -213,10 +213,11 @@
//int rate = 8000;
//int codec_ms = 20;
switch_channel_t *channel;
- switch_codec_interface_t *codecs[SWITCH_MAX_CODECS];
+ const switch_codec_implementation_t *codecs[SWITCH_MAX_CODECS];
int num_codecs = 0;
unsigned int local_cap = 0, mixed_cap = 0, chosen = 0, leading = 0;
int x, srate = 8000;
+ uint32_t interval = 0;
if (globals.codec_string) {
if ((num_codecs = switch_loadable_module_get_codecs_sorted(codecs,
@@ -235,7 +236,7 @@
for (x = 0; x < num_codecs; x++) {
static const switch_codec_implementation_t *imp;
- for (imp = codecs[x]->implementations; imp; imp = imp->next) {
+ for (imp = codecs[x]; imp; imp = imp->next) {
unsigned int codec = iana2ast(imp->ianacode);
if (io == IAX_QUERY) {
@@ -251,7 +252,7 @@
mixed_cap = local_cap;
}
- leading = iana2ast(codecs[0]->implementations->ianacode);
+ leading = iana2ast(codecs[0]->ianacode);
if (io == IAX_QUERY) {
chosen = leading;
*format = chosen;
@@ -263,7 +264,7 @@
return SWITCH_STATUS_SUCCESS;
} else if (switch_test_flag(&globals, GFLAG_MY_CODEC_PREFS) && (leading & mixed_cap)) {
chosen = leading;
- dname = codecs[0]->implementations->iananame;
+ dname = codecs[0]->iananame;
} else {
unsigned int prefs[32];
int len = 0;
@@ -288,9 +289,10 @@
chosen = prefs[x];
for (z = 0; z < num_codecs; z++) {
static const switch_codec_implementation_t *imp;
- for (imp = codecs[z]->implementations; imp; imp = imp->next) {
+ for (imp = codecs[z]; imp; imp = imp->next) {
if (prefs[x] == iana2ast(imp->ianacode)) {
dname = imp->iananame;
+ interval = imp->microseconds_per_frame / 1000;
break;
}
}
@@ -303,10 +305,11 @@
chosen = *format;
for (x = 0; x < num_codecs; x++) {
static const switch_codec_implementation_t *imp;
- for (imp = codecs[x]->implementations; imp; imp = imp->next) {
+ for (imp = codecs[x]; imp; imp = imp->next) {
unsigned int cap = iana2ast(imp->ianacode);
if (cap == chosen) {
dname = imp->iananame;
+ interval = imp->microseconds_per_frame / 1000;
break;
}
}
@@ -314,11 +317,12 @@
} else { /* c'mon there has to be SOMETHING... */
for (x = 0; x < num_codecs; x++) {
static const switch_codec_implementation_t *imp;
- for (imp = codecs[x]->implementations; imp; imp = imp->next) {
+ for (imp = codecs[x]; imp; imp = imp->next) {
unsigned int cap = iana2ast(imp->ianacode);
if (cap & mixed_cap) {
chosen = cap;
dname = imp->iananame;
+ interval = imp->microseconds_per_frame / 1000;
break;
}
}
@@ -366,7 +370,7 @@
if (switch_core_codec_init(&tech_pvt->read_codec,
dname,
srate,
- 0,
+ interval,
1,
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
@@ -376,7 +380,7 @@
if (switch_core_codec_init(&tech_pvt->write_codec,
dname,
srate,
- 0,
+ interval,
1,
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
Added: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/README
==============================================================================
--- (empty file)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/README Mon Jul 10 18:42:22 2006
@@ -0,0 +1,96 @@
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* Description: We don't need any documentation, do we?
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* README
+*
+*/
+
+mod_cdr has been written in C++ using class inheritence and virtual methods, and registers all classes that
+have been built in at load time. It then calls up the connect() method on each particular object and if successful at initializing the object, it adds it to a data structure that contains 1 instance of every sucessfully configured and connected object. This means that at any time after loading, it will only try to create objects that are functional, skipping any that are built in but are not desired for use at the current time.
+
+In order to use mod_cdr, you must uncomment this line in the freeswitch.xml configuration file located in the conf directory: <load module="mod_cdr"/> in the <modules> section. Then below this section, you need to uncomment this section <configuration name="mod_cdr.conf" description="CDR Configuration"> and input the per class configurations. All class specific configurations go within this parent section as a subsection.
+
+There are currently the following types of loggers:
+
+Class: CsvCDR, located in csvcdr.h and csvcdr.cpp
+Description: This is the standard CSV output class. It has a default list of CDR elements that it always
+ logs, and the user can specify channel variables to be logged in a fixed order (chanvars_fixed) starting after the last default value to be logged. Additionally, the user can specify additional channel variables to be logged after the fixed order channel variables as key=value pairs.
+Configuration: Section name: <csvcdr>
+ <param name="path" value=""/> value is the location to put the files (required) <param name="size_limit" value=""/> value is the size limit of the output file, default value of 10MB (optional)
+ <param name="chanvars_fixed" value=""/> value is a comma separated list of fixed channel variables to log. This cannot be a wildcard (*). (optional)
+ <param name="chanvars_supp" value=""/> value is a comma separated list of supplemental channel variables to log. It can be a wildcard (*). (optional)
+ <param name="repeat_fixed_in_supp" value=""/> value is a 0 for no, 1 for yes, and is for the case that you might want any fixed channel variables to be repeated in the supplemental list.
+
+Class: AnthmCDR, located in anthmcdr.h and anthmcdr.cpp
+Description: This is the Perl Data Dumper output class. It writes each record to an individual text file
+ containing all the information. It does not distinguish between fixed and supplemental channel variables. If you are running freeswitch in a high volume environment, it is important to note that these individual files are small, often times between 750 and 1500 bytes. It is therefore recommended to use a partition with small cluster sizes or (on systems supporting) on reiserfs or reiser4 filesystems which are both excellent handlers of large numbers of small files.
+Configuration: Section name: <anthmcdr>
+ <param name="path" value=""/> value is the path where you want the output files (required)
+ <param name="chanvars" value=""/> value is a comma separated list of channel variables to log. It can accept a wildcard (*) (optional)
+
+Class: MysqlCDR, located in mysqlcdr.h and mysqlcdr.cpp
+Description: This class logs the call detail record to a MySQL 4.1.x or greater database using prepared
+ statements. This class is a little more complex than the prior two in that the fixed channel variables are treated as additional columns on the main freeswitchcdr database table for improved normalization of the database. As such, you need to specify the format of each fixed channel variable as well. If you do not specify, it will default to a varchar column type, and will not execute if the table schema does not match. Therefore it is very important to make sure that any fixed channel variables you log exist as columns on the table. The supplemental channel variables are stored in a separate table using a key / value pair linking to the callid of the call.
+Configuration: Section: <mysqlcdr>
+ <param name="hostname" value=""/> value is the hostname or IP of the MySQL server (required)
+ <param name="username" value=""/> value is the username to connect to the MySQL server with (required)
+ <param name="password" value=""/> value is the password to use to authenticate to the MySQL server with (required)
+ <param name="dbname" value=""/> value is the name of the database to connect to (required)
+ <param name="chanvars_fixed" value=""/> Is a comma separated list of key=type pairs. Types are x for decimal, s for string (varchar), d for double, i for integer, t for tiny. If no type is provided, it defaults that column to string (varchar). It cannot accept wildcards (*). (optional)
+ <param name="chanvars_supp" value=""/> value is a comma separated list of supplemental channel variables to log. Can be a wildcard (*) (optional)
+ <param name="chanvars_supp_repeat_fixed" value=""/> value is 0 for no, 1 for yes, and determines whether or not to repeat any of the fixed channel variables as key / value pairs in the chanvars table.
+
+FAQ:
+
+Q: Why C++?
+A: Why not? It works well in this design.
+
+Q: Why is there a distinction between fixed and supplemental channel variables?
+A: There is a distinction so that a level of uniformity can be maintain on those loggers that require uniformity. For example, if you expect that channel variable FOO will always been at a specific location on a CSV row, then it is required that it be a fixed channel variable. The fixed means that it is a fixed position, and needs to be logged even if it is blank. Supplemental channel variables, on the other hand, are more dynamic, and will only log those channel variables that actually exist on that given leg of the call. That means that if you supply a wildcard, it will simply iterate all the channel variables. If you do not want to repeat the fixed channel variables in the supplemental channel variables, it will then remove the fixed channel variables from the data structure holding the supplemental channel variables even before the process_record() method is called up.
+
+Q: What would an example configuration look like?
+A: Here is an excerpt from the freeswitch XML configuration file:
+
+ <configuration name="mod_cdr.conf" description="CDR Configuration">
+ <anthmcdr>
+ <param name="path" value="/work/temp/anthmcdr"/>
+ <param name="chanvars" value="username,accountcode"/>
+ <param name="chanvars_fixed" value="*"/>
+ </anthmcdr>
+ <csvcdr>
+ <param name="path" value="/work/temp/csvcdr"/>
+ <param name="size_limit" value="25"/>
+ <param name="chanvars_fixed" value="username"/>
+ <param name="chanvars_supp" value="*"/>
+ <param name="repeat_fixed_in_supp" value="0"/>
+ </csvcdr>
+ <mysqlcdr>
+ <param name="hostname" value="10.0.0.1"/>
+ <param name="username" value="test"/>
+ <param name="password" value="test"/>
+ <param name="dbname" value="testing"/>
+ <param name="chanvars_fixed" value="username=s,The_Kow=t"/>
+ <!-- This previous line logs username as a varchar, and The_Kow as a tiny -->
+ <param name="chanvars_supp" value="*"/>
+ <param name="chanvars_supp_repeat_fixed" value="0"/>
+ </mysqlcdr>
+ </configuration>
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/anthmcdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/anthmcdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/anthmcdr.cpp Mon Jul 10 18:42:22 2006
@@ -1,3 +1,32 @@
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* Description: This C++ source file describes the AnthmCDR class which handles formatting a CDR out to
+* individual text files in a Perl Data Dumper format. It is named in honor of Anthony Minnesale, as he
+* was the initial requester of this format.
+*
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* anthmcdr.cpp
+*
+*/
+
#include <switch.h>
#include "anthmcdr.h"
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/anthmcdr.h
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/anthmcdr.h (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/anthmcdr.h Mon Jul 10 18:42:22 2006
@@ -1,8 +1,34 @@
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* Description: This C++ header file describes the AnthmCDR class which handles formatting a CDR out to
+* individual text files in a Perl Data Dumper format. It is named in honor of Anthony Minnesale, as he
+* was the initial requester of this format.
+*
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* anthmcdr.h
+*
+*/
+
#include "baseregistry.h"
#include <switch.h>
-// #include <sys/types.h>
-// #include <sys/stat.h>
-// #include <fcntl.h>
#include <iostream>
#include <fstream>
#include <list>
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.cpp Mon Jul 10 18:42:22 2006
@@ -1,3 +1,31 @@
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* Description: This C++ source file describes the BaseCDR class that all other CDR classes inherit from.
+* It handles the bulk of the processing of data from the switch_channel_t objects.
+*
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* basecdr.cpp
+*
+*/
+
#include "basecdr.h"
#include <iostream>
#include <cstring>
@@ -128,12 +156,8 @@
strncpy(lastdata,newchannel->callerextension->last_application->application_data,strlen(newchannel->callerextension->last_application->application_data));
}
- amaflags=0; // For future use I guess? I don't see anything in the docs about this
- /*
- strncpy(accountcode," ",1); // Also for future use I guess?
- strncpy(uniqueid," ",1); // I don't see any of the user stuff in the docs yet
- strncpy(userfield," ",1); // So we can't add these yet
- */
+ amaflags=0;
+
switch_console_printf(SWITCH_CHANNEL_LOG, "BaseCDR::BaseCDR(switch_mod_cdr_newchannel*) - Processing completed.\n");
}
}
@@ -197,7 +221,7 @@
{
bool fixed = 1;
std::string tempstring, tempstring2;
- switch_mod_cdr_sql_types sql_type;
+ switch_mod_cdr_sql_types_t sql_type;
parse_channel_variables_xconfig(unparsed,chanvarlist,fixed);
std::list<std::string> tempchanvarlist; // = chanvarlist;
std::list<std::string>::iterator iEnd, iItr;
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.h
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.h (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.h Mon Jul 10 18:42:22 2006
@@ -1,15 +1,32 @@
-//
-// C++ Interface: %{MODULE}
-//
-// Description:
-//
-//
-// Author: %{AUTHOR} <%{EMAIL}>, (C) %{YEAR}
-//
-// Copyright: See COPYING file that comes with this distribution
-//
-// BaseRegistry and BaseRegistration classes and AUTO_REGISTER_BASECDR provided by David Terrell
-// from his blog posting http://meat.net/2006/03/cpp-runtime-class-registration/
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Description: This header describes the switch_mod_cdr_newchannel_t struct, the BaseCDR base class that all
+* CDR loggers will inherit from, and the switch_mod_cdr_sql_types_t enum for use with the SQL type loggers
+* (i.e. MySQL). This is part of the mod_cdr module for Freeswitch by Anthony Minnesale and friends.
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* basecdr.h
+*
+*/
+
#ifndef BASECDR
#define BASECDR
@@ -34,7 +51,7 @@
bool originate;
};
-enum switch_mod_cdr_sql_types { CDR_INTEGER,CDR_STRING,CDR_DECIMAL,CDR_DOUBLE,CDR_TINY };
+enum switch_mod_cdr_sql_types_t { CDR_INTEGER,CDR_STRING,CDR_DECIMAL,CDR_DOUBLE,CDR_TINY };
class BaseCDR {
public:
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/baseregistry.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/baseregistry.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/baseregistry.cpp Mon Jul 10 18:42:22 2006
@@ -1,3 +1,34 @@
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Description: This C++ source describes the BaseRegistry and BaseRegistration classes that implement
+* the factory routine with the aid of the templated base_factory() function.
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* BaseRegistry and BaseRegistration classes and AUTO_REGISTER_BASECDR macro provided in part by David
+* Terrell from his blog posting http://meat.net/2006/03/cpp-runtime-class-registration/ Much thanks to him
+* for his help.
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* baseregistry.cpp
+*
+*/
+
#include "baseregistry.h"
BaseRegistry& BaseRegistry::get()
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/baseregistry.h
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/baseregistry.h (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/baseregistry.h Mon Jul 10 18:42:22 2006
@@ -1,3 +1,34 @@
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Description: This C++ header describes the BaseRegistry and BaseRegistration classes that implement
+* the factory routine with the aid of the templated base_factory() function.
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* BaseRegistry and BaseRegistration classes and AUTO_REGISTER_BASECDR macro provided in part by David
+* Terrell from his blog posting http://meat.net/2006/03/cpp-runtime-class-registration/ Much thanks to him
+* for his help.
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* baseregistry.h
+*
+*/
+
#include "basecdr.h"
#include <iostream>
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.cpp Mon Jul 10 18:42:22 2006
@@ -1,6 +1,33 @@
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* Description: This C++ source file describes the CDRContainer singleton object used by mod_cdr to control
+* the creation, processing, and destruction of various CDR logger objects.
+*
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* cdrcontainer.cpp
+*
+*/
+
#include "cdrcontainer.h"
#include "baseregistry.h"
-// #include <switch.h>
CDRContainer::CDRContainer()
{
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.h
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.h (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.h Mon Jul 10 18:42:22 2006
@@ -1,14 +1,30 @@
-//
-// C++ Interface: %{MODULE}
-//
-// Description:
-//
-//
-// Author: Yossi Neiman <REMOVED FOR THE SPAMBOTS>, (C) 2006
-//
-// Copyright: See COPYING file that comes with this distribution
-//
-//
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* Description: This C++ header file describes the CDRContainer singleton object used by mod_cdr to control
+* the creation, processing, and destruction of various CDR logger objects.
+*
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* cdrcontainer.h
+*
+*/
#ifndef CDRCONTAINER
#define CDRCONTAINER
@@ -23,8 +39,6 @@
/*
The CDRContainer Class will serve as a central receptacle for all CDR methods. CDRContainer::CDRContainer() will initialize the system, and CDRContainer::add_cdr() will add a new object of each CDR type to a queue for "later processing" by the other thread.
CDRContainer::process_records() will iterate thru the queue and commit the records to the respective backends.
-
-Need to rethink the temporary dumping of data to file in the event of failure to commit to the backend. I forgot what I was intending to do initially to capture the failure.
*/
#ifdef __cplusplus
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/csvcdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/csvcdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/csvcdr.cpp Mon Jul 10 18:42:22 2006
@@ -1,3 +1,33 @@
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* Description: This C++ source file describes the CsvCDR class that handles processing CDRs to a CSV format.
+* This is the standard CSV module, and has a list of predefined variables to log out which can be
+* added to, but never have the default ones removed. If you want to use one that allows you to explicity
+* set all data variables to be logged and in what order, then this is not the class you want to use, and
+* one will be coming in the future to do just that.
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* csvcdr.cpp
+*
+*/
+
#include <switch.h>
#include "csvcdr.h"
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/csvcdr.h
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/csvcdr.h (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/csvcdr.h Mon Jul 10 18:42:22 2006
@@ -1,8 +1,35 @@
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* Description: This C++ header file describes the CsvCDR class that handles processing CDRs to a CSV format.
+* This is the standard CSV module, and has a list of predefined variables to log out which can be
+* added to, but never have the default ones removed. If you want to use one that allows you to explicity
+* set all data variables to be logged and in what order, then this is not the class you want to use, and
+* one will be coming in the future to do just that.
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* csvcdr.h
+*
+*/
+
#include "baseregistry.h"
#include <switch.h>
-// #include <sys/types.h>
-// #include <sys/stat.h>
-// #include <fcntl.h>
#include <iostream>
#include <fstream>
#include <list>
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/mod_cdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/mod_cdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/mod_cdr.cpp Mon Jul 10 18:42:22 2006
@@ -1,3 +1,32 @@
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* Description: This source file describes the most basic portions of the CDR module. These are the functions
+* and structures that the Freeswitch core looks for when opening up the DSO file to create the load, shutdown
+* and runtime threads as necessary.
+*
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* mod_cdr.cpp
+*
+*/
+
#include "cdrcontainer.h"
#include <switch.h>
#include <sys/types.h>
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/mysqlcdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/mysqlcdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/mysqlcdr.cpp Mon Jul 10 18:42:22 2006
@@ -1,3 +1,31 @@
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* Description: This C++ source file describes the MysqlCDR class which handles formatting a CDR out to
+* a MySQL 4.1.x or greater server using prepared statements.
+*
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* mysqlcdr.cpp
+*
+*/
+
#include <mysql.h>
#include <switch.h>
#include <cstring>
@@ -44,7 +72,7 @@
bool MysqlCDR::repeat_fixed_in_supp = 0;
std::list<std::string> MysqlCDR::chanvars_fixed_list;
std::list<std::string> MysqlCDR::chanvars_supp_list;
-std::vector<switch_mod_cdr_sql_types> MysqlCDR::chanvars_fixed_types;
+std::vector<switch_mod_cdr_sql_types_t> MysqlCDR::chanvars_fixed_types;
bool MysqlCDR::activated = 0;
char* MysqlCDR::sql_query = 0;
std::string MysqlCDR::tmp_sql_query;
Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/mysqlcdr.h
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/mysqlcdr.h (original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/mysqlcdr.h Mon Jul 10 18:42:22 2006
@@ -1,3 +1,31 @@
+/*
+* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+*
+* Copyright 2006, Author: Yossi Neiman, president of Cartis Solutions, Inc.
+* <freeswitch AT cartissolutions.com>
+*
+* Description: This C++ header file describes the MysqlCDR class which handles formatting a CDR out to
+* a MySQL 4.1.x or greater server using prepared statements.
+*
+*
+* Version: MPL 1.1
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* http://www.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License
+*
+* The Core API is the FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application by
+* Anthony Minnesale II <anthmct(a)yahoo.com>
+*
+* mysqlcdr.h
+*
+*/
+
#include "baseregistry.h"
#include <list>
#include <sstream>
@@ -30,7 +58,7 @@
static bool connectionstate;
static bool logchanvars;
static std::list<std::string> chanvars_fixed_list;
- static std::vector<switch_mod_cdr_sql_types> chanvars_fixed_types;
+ static std::vector<switch_mod_cdr_sql_types_t> chanvars_fixed_types;
static std::list<std::string> chanvars_supp_list; // The supplemental list
static bool repeat_fixed_in_supp;
static char hostname[255];
Modified: freeswitch/branches/mishehu/src/switch.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch.c (original)
+++ freeswitch/branches/mishehu/src/switch.c Mon Jul 10 18:42:22 2006
@@ -188,7 +188,7 @@
#define __CP "DISABLED"
#endif
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "freeswitch Version %s Started. Crash Protection [%s]\n\n", SWITCH_VERSION_FULL, __CP);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "freeswitch Version %s Started. Crash Protection [%s] Max Sessions[%u]\n\n", SWITCH_VERSION_FULL, __CP, switch_core_session_limit(0));
snprintf(path, sizeof(path), "%s%s%s", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR, pfile);
if (bg) {
@@ -217,6 +217,8 @@
switch_event_fire(&event);
}
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "End existing sessions\n");
+ switch_core_session_hupall();
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Clean up modules.\n");
switch_loadable_module_shutdown();
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Tearing down environment.\n");
Modified: freeswitch/branches/mishehu/src/switch_channel.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch_channel.c (original)
+++ freeswitch/branches/mishehu/src/switch_channel.c Mon Jul 10 18:42:22 2006
@@ -83,6 +83,7 @@
{ "PROTOCOL_ERROR", SWITCH_CAUSE_PROTOCOL_ERROR },
{ "INTERWORKING", SWITCH_CAUSE_INTERWORKING },
{ "CRASH", SWITCH_CAUSE_CRASH },
+ { "SYSTEM_SHUTDOWN", SWITCH_CAUSE_SYSTEM_SHUTDOWN },
{ NULL, 0 }
};
@@ -846,6 +847,10 @@
if (channel->state >= CS_HANGUP) {
return SWITCH_STATUS_FALSE;
+ }
+
+ if (switch_channel_test_flag(channel, CF_ANSWERED)) {
+ return SWITCH_STATUS_SUCCESS;
}
msg.message_id = SWITCH_MESSAGE_INDICATE_PROGRESS;
Modified: freeswitch/branches/mishehu/src/switch_core.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch_core.c (original)
+++ freeswitch/branches/mishehu/src/switch_core.c Mon Jul 10 18:42:22 2006
@@ -85,6 +85,7 @@
uint32_t session_id;
apr_pool_t *memory_pool;
switch_hash_t *session_table;
+ switch_mutex_t *session_table_mutex;
#ifdef CRASH_PROT
switch_hash_t *stack_table;
#endif
@@ -93,6 +94,8 @@
const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS];
int state_handler_index;
FILE *console;
+ uint32_t session_count;
+ uint32_t session_limit;
switch_queue_t *sql_queue;
};
@@ -246,6 +249,8 @@
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_locate(char *uuid_str)
{
switch_core_session_t *session;
+
+ switch_mutex_lock(runtime.session_table_mutex);
if ((session = switch_core_hash_find(runtime.session_table, uuid_str))) {
/* Acquire a read lock on the session */
if (switch_thread_rwlock_tryrdlock(session->rwlock) != SWITCH_STATUS_SUCCESS) {
@@ -253,16 +258,41 @@
session = NULL;
}
}
+ switch_mutex_unlock(runtime.session_table_mutex);
/* if its not NULL, now it's up to you to rwunlock this */
return session;
}
+SWITCH_DECLARE(void) switch_core_session_hupall(void)
+{
+ switch_hash_index_t *hi;
+ void *val;
+ switch_core_session_t *session;
+ switch_channel_t *channel;
+
+ switch_mutex_lock(runtime.session_table_mutex);
+ for (hi = switch_hash_first(runtime.memory_pool, runtime.session_table); hi; hi = switch_hash_next(hi)) {
+ switch_hash_this(hi, NULL, NULL, &val);
+ if (val) {
+ session = (switch_core_session_t *) val;
+ channel = switch_core_session_get_channel(session);
+ switch_channel_hangup(channel, SWITCH_CAUSE_SYSTEM_SHUTDOWN);
+ }
+ }
+ switch_mutex_unlock(runtime.session_table_mutex);
+
+ while(runtime.session_count) {
+ switch_yield(1000);
+ }
+}
+
SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(char *uuid_str, switch_core_session_message_t *message)
{
switch_core_session_t *session = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
+ switch_mutex_lock(runtime.session_table_mutex);
if ((session = switch_core_hash_find(runtime.session_table, uuid_str)) != 0) {
/* Acquire a read lock on the session or forget it the channel is dead */
if (switch_thread_rwlock_tryrdlock(session->rwlock) == SWITCH_STATUS_SUCCESS) {
@@ -272,6 +302,7 @@
switch_thread_rwlock_unlock(session->rwlock);
}
}
+ switch_mutex_unlock(runtime.session_table_mutex);
return status;
}
@@ -281,6 +312,7 @@
switch_core_session_t *session = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
+ switch_mutex_lock(runtime.session_table_mutex);
if ((session = switch_core_hash_find(runtime.session_table, uuid_str)) != 0) {
/* Acquire a read lock on the session or forget it the channel is dead */
if (switch_thread_rwlock_tryrdlock(session->rwlock) == SWITCH_STATUS_SUCCESS) {
@@ -290,6 +322,7 @@
switch_thread_rwlock_unlock(session->rwlock);
}
}
+ switch_mutex_unlock(runtime.session_table_mutex);
return status;
}
@@ -2344,6 +2377,9 @@
apr_pool_destroy(pool);
pool = NULL;
+ switch_mutex_lock(runtime.session_table_mutex);
+ runtime.session_count--;
+ switch_mutex_unlock(runtime.session_table_mutex);
}
SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t **hash, switch_memory_pool_t *pool)
@@ -2434,18 +2470,21 @@
{
switch_core_session_t *session = obj;
session->thread = thread;
- session->id = runtime.session_id++;
-
snprintf(session->name, sizeof(session->name), "%u", session->id);
-
+ switch_mutex_lock(runtime.session_table_mutex);
+ session->id = runtime.session_id++;
switch_core_hash_insert(runtime.session_table, session->uuid_str, session);
+ switch_mutex_unlock(runtime.session_table_mutex);
+
switch_core_session_run(session);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Session %u (%s) Locked, Waiting on external entities\n", session->id, switch_channel_get_name(session->channel));
switch_core_session_write_lock(session);
switch_core_session_rwunlock(session);
+ switch_mutex_lock(runtime.session_table_mutex);
switch_core_hash_delete(runtime.session_table, session->uuid_str);
+ switch_mutex_unlock(runtime.session_table_mutex);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Session %u (%s) Ended\n", session->id, switch_channel_get_name(session->channel));
switch_core_session_destroy(&session);
return NULL;
@@ -2503,9 +2542,19 @@
switch_memory_pool_t *usepool;
switch_core_session_t *session;
switch_uuid_t uuid;
+ uint32_t count = 0;
assert(endpoint_interface != NULL);
+ switch_mutex_lock(runtime.session_table_mutex);
+ count = runtime.session_count;
+ switch_mutex_unlock(runtime.session_table_mutex);
+
+ if ((count + 1) > runtime.session_limit) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Over Session Limit!\n");
+ return NULL;
+ }
+
if (pool) {
usepool = pool;
} else if (switch_core_new_memory_pool(&usepool) != SWITCH_STATUS_SUCCESS) {
@@ -2551,6 +2600,9 @@
switch_thread_cond_create(&session->cond, session->pool);
switch_thread_rwlock_create(&session->rwlock, session->pool);
+ switch_mutex_lock(runtime.session_table_mutex);
+ runtime.session_count++;
+ switch_mutex_unlock(runtime.session_table_mutex);
return session;
}
@@ -2806,10 +2858,22 @@
#endif
}
+
+SWITCH_DECLARE(uint32_t) switch_core_session_limit(uint32_t new)
+{
+ if (new) {
+ runtime.session_limit = new;
+ }
+
+ return runtime.session_limit;
+}
+
SWITCH_DECLARE(switch_status_t) switch_core_init(char *console, const char **err)
{
memset(&runtime, 0, sizeof(runtime));
-
+ runtime.session_limit = 1000;
+ switch_xml_t xml = NULL, cfg = NULL;
+
switch_core_set_globals();
/* INIT APR and Create the pool context */
@@ -2830,6 +2894,23 @@
return SWITCH_STATUS_MEMERR;
}
+
+ if ((xml = switch_xml_open_cfg("switch.conf", &cfg, NULL))) {
+ switch_xml_t settings, param;
+
+ if ((settings = switch_xml_child(cfg, "settings"))) {
+ for (param = switch_xml_child(settings, "param"); param; param = param->next) {
+ char *var = (char *) switch_xml_attr_soft(param, "name");
+ char *val = (char *) switch_xml_attr_soft(param, "value");
+
+ if (!strcasecmp(var, "max-sessions")) {
+ runtime.session_limit = atoi(val);
+ }
+ }
+ }
+ switch_xml_free(xml);
+ }
+
*err = NULL;
if(console) {
@@ -2909,6 +2990,7 @@
runtime.session_id = 1;
switch_core_hash_init(&runtime.session_table, runtime.memory_pool);
+ switch_mutex_init(&runtime.session_table_mutex, SWITCH_MUTEX_NESTED, runtime.memory_pool);
#ifdef CRASH_PROT
switch_core_hash_init(&runtime.stack_table, runtime.memory_pool);
#endif
Modified: freeswitch/branches/mishehu/src/switch_loadable_module.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch_loadable_module.c (original)
+++ freeswitch/branches/mishehu/src/switch_loadable_module.c Mon Jul 10 18:42:22 2006
@@ -633,16 +633,18 @@
return switch_core_hash_find(loadable_modules.directory_hash, name);
}
-SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, switch_codec_interface_t **array,
+SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, const switch_codec_implementation_t **array,
int arraylen)
{
switch_hash_index_t *hi;
void *val;
+ switch_codec_interface_t *codec_interface;
int i = 0;
for (hi = switch_hash_first(pool, loadable_modules.codec_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
- array[i++] = val;
+ codec_interface = (switch_codec_interface_t *) val;
+ array[i++] = codec_interface->implementations;
if (i > arraylen) {
break;
}
@@ -652,20 +654,44 @@
}
-SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(switch_codec_interface_t **array,
+SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_implementation_t **array,
int arraylen, char **prefs, int preflen)
{
int x, i = 0;
switch_codec_interface_t *codec_interface;
+ const switch_codec_implementation_t *imp;
- for (x = 0; x < preflen; x++) {
- if ((codec_interface = switch_loadable_module_get_codec_interface(prefs[x])) != 0 ) {
- array[i++] = codec_interface;
- if (i > arraylen) {
- break;
+ for (x = 0; x < preflen; x++) {
+ char *name, *p, buf[128];
+ uint32_t interval = 0, len = 0;
+
+ name = prefs[x];
+ if ((p = strchr(name, '@'))) {
+ p++;
+ len = p-name;
+
+ if (len > sizeof(buf)) {
+ len = sizeof(buf);
+ }
+ switch_copy_string(buf, name, len);
+ *(buf + len) = '\0';
+ interval = atoi(p);
+ name = buf;
+ }
+
+ if ((codec_interface = switch_loadable_module_get_codec_interface(name)) != 0 ) {
+ for (imp = codec_interface->implementations; imp; imp = imp->next) {
+ if (!interval) {
+ array[i++] = imp;
+ } else if ((imp->microseconds_per_frame / 1000) == interval) {
+ array[i++] = imp;
+ }
}
- }
- }
+ if (i > arraylen) {
+ break;
+ }
+ }
+ }
return i;
}
Modified: freeswitch/branches/mishehu/w32/vsnet/Freeswitch.sln
==============================================================================
--- freeswitch/branches/mishehu/w32/vsnet/Freeswitch.sln (original)
+++ freeswitch/branches/mishehu/w32/vsnet/Freeswitch.sln Mon Jul 10 18:42:22 2006
@@ -208,6 +208,11 @@
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_conference", "..\..\src\mod\applications\mod_conference\mod_conference.vcproj", "{C24FB505-05D7-4319-8485-7540B44C8603}"
+ ProjectSection(ProjectDependencies) = postProject
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -354,6 +359,10 @@
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Debug|Win32.Build.0 = Debug|Win32
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Release|Win32.ActiveCfg = Release|Win32
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Release|Win32.Build.0 = Release|Win32
+ {C24FB505-05D7-4319-8485-7540B44C8603}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C24FB505-05D7-4319-8485-7540B44C8603}.Debug|Win32.Build.0 = Debug|Win32
+ {C24FB505-05D7-4319-8485-7540B44C8603}.Release|Win32.ActiveCfg = Release|Win32
+ {C24FB505-05D7-4319-8485-7540B44C8603}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -376,6 +385,7 @@
{0E2C6395-13B9-46E5-9264-8859D346018D} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
+ {C24FB505-05D7-4319-8485-7540B44C8603} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{3A5B9131-F20C-4A85-9447-6C1610941CEE} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{5FD31A25-5D83-4794-8BEE-904DAD84CE71} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{FE3540C5-3303-46E0-A69E-D92F775687F1} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
1
0
Author: sphere
Date: Mon Jul 10 17:21:38 2006
New Revision: 1817
Added:
freeswitch/branches/dcornewell/
Log:
Creating empty folder for dcornewell
1
0
Author: sphere
Date: Mon Jul 10 16:12:39 2006
New Revision: 1815
Added:
freeswitch/branches/achikrauz/
Log:
Creating empty folder for achikrauz
1
0
Author: sphere
Date: Mon Jul 10 12:45:39 2006
New Revision: 1812
Added:
freeswitch/branches/netstars/
Log:
Creating empty folder for netstars
1
0
[commit] r1810 - in freeswitch/branches/stkn: . build/config conf scripts src src/include src/mod/applications/mod_conference src/mod/applications/mod_rss w32/vsnet
by Freeswitch SVN 10 Jul '06
by Freeswitch SVN 10 Jul '06
10 Jul '06
Author: stkn
Date: Mon Jul 10 11:15:11 2006
New Revision: 1810
Added:
freeswitch/branches/stkn/scripts/fsxs.in
- copied unchanged from r1809, /freeswitch/trunk/scripts/fsxs.in
freeswitch/branches/stkn/src/mod/applications/mod_conference/
- copied from r1809, /freeswitch/trunk/src/mod/applications/mod_conference/
freeswitch/branches/stkn/src/mod/applications/mod_conference/mod_conference.c
- copied unchanged from r1809, /freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
freeswitch/branches/stkn/src/mod/applications/mod_conference/mod_conference.vcproj
- copied unchanged from r1809, /freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.vcproj
Removed:
freeswitch/branches/stkn/fsxs.in
Modified:
freeswitch/branches/stkn/Makefile.am
freeswitch/branches/stkn/Makefile.in
freeswitch/branches/stkn/aclocal.m4
freeswitch/branches/stkn/build/config/config.guess
freeswitch/branches/stkn/build/config/config.sub
freeswitch/branches/stkn/build/config/ltmain.sh
freeswitch/branches/stkn/conf/freeswitch.xml
freeswitch/branches/stkn/modules.conf.in
freeswitch/branches/stkn/src/include/switch_core.h
freeswitch/branches/stkn/src/include/switch_types.h
freeswitch/branches/stkn/src/mod/applications/mod_rss/mod_rss.c
freeswitch/branches/stkn/src/switch.c
freeswitch/branches/stkn/src/switch_channel.c
freeswitch/branches/stkn/src/switch_core.c
freeswitch/branches/stkn/w32/vsnet/Freeswitch.sln
Log:
Update to trunk
Modified: freeswitch/branches/stkn/Makefile.am
==============================================================================
--- freeswitch/branches/stkn/Makefile.am (original)
+++ freeswitch/branches/stkn/Makefile.am Mon Jul 10 11:15:11 2006
@@ -28,7 +28,7 @@
if USE_GCCVISIBILITY
AM_CFLAGS += -fvisibility=hidden
endif
-endif
+endif ISLINUX
if CRASHPROT
AM_CFLAGS += -DCRASH_PROT
@@ -134,7 +134,7 @@
src/include/switch_xml.h
BUILT_SOURCES = version depends
-CLEANFILES = src/include/switch_version.h fsxs
+CLEANFILES = src/include/switch_version.h scripts/fsxs
lib_LTLIBRARIES = libfreeswitch.la
@@ -144,7 +144,7 @@
nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h
bin_PROGRAMS = freeswitch
-bin_SCRIPTS = fsxs
+bin_SCRIPTS = scripts/fsxs
freeswitch_SOURCES = src/switch.c\
src/include/switch_version.h
freeswitch_CFLAGS = $(AM_CFLAGS)
@@ -244,7 +244,7 @@
dox:
cd docs && doxygen $(PWD)/docs/Doxygen.conf
-fsxs: fsxs.in
+scripts/fsxs: scripts/fsxs.in
@echo creating fsxs
@sed -e "s,@MODULES_DIR\@,$(PREFIX)/mod," \
-e "s,@LIB_DIR\@,$(PREFIX)/lib," \
@@ -263,7 +263,7 @@
-e "s|@SOLINK\@|$(SOLINK)|" \
-e "s|@LDFLAGS\@|-L$(PREFIX)/lib|" \
-e "s|@LIBS\@|-lfreeswitch|" \
- fsxs.in > fsxs
+ scripts/fsxs.in > scripts/fsxs
eclean: clean
rm -f `find . -type f -name \*~`
Modified: freeswitch/branches/stkn/Makefile.in
==============================================================================
--- freeswitch/branches/stkn/Makefile.in (original)
+++ freeswitch/branches/stkn/Makefile.in Mon Jul 10 11:15:11 2006
@@ -350,13 +350,13 @@
src/include/switch_xml.h
BUILT_SOURCES = version depends
-CLEANFILES = src/include/switch_version.h fsxs
+CLEANFILES = src/include/switch_version.h scripts/fsxs
lib_LTLIBRARIES = libfreeswitch.la
libfreeswitch_la_CFLAGS = $(AM_CFLAGS) -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -std=c99
libfreeswitch_la_LDFLAGS = -version-info 1:0:0
libfreeswitch_la_LIBADD = -lteletone -lresample -lsrtp -lsqlite3 -lspeakup
nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h
-bin_SCRIPTS = fsxs
+bin_SCRIPTS = scripts/fsxs
freeswitch_SOURCES = src/switch.c\
src/include/switch_version.h
@@ -1171,7 +1171,7 @@
dox:
cd docs && doxygen $(PWD)/docs/Doxygen.conf
-fsxs: fsxs.in
+scripts/fsxs: scripts/fsxs.in
@echo creating fsxs
@sed -e "s,@MODULES_DIR\@,$(PREFIX)/mod," \
-e "s,@LIB_DIR\@,$(PREFIX)/lib," \
@@ -1190,7 +1190,7 @@
-e "s|@SOLINK\@|$(SOLINK)|" \
-e "s|@LDFLAGS\@|-L$(PREFIX)/lib|" \
-e "s|@LIBS\@|-lfreeswitch|" \
- fsxs.in > fsxs
+ scripts/fsxs.in > scripts/fsxs
eclean: clean
rm -f `find . -type f -name \*~`
Modified: freeswitch/branches/stkn/aclocal.m4
==============================================================================
--- freeswitch/branches/stkn/aclocal.m4 (original)
+++ freeswitch/branches/stkn/aclocal.m4 Mon Jul 10 11:15:11 2006
@@ -13,7 +13,7 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-# serial 47 AC_PROG_LIBTOOL
+# serial 48 AC_PROG_LIBTOOL
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@@ -163,6 +163,7 @@
test -z "$AS" && AS=as
test -z "$CC" && CC=cc
test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$LD" && LD=ld
test -z "$LN_S" && LN_S="ln -s"
@@ -182,10 +183,10 @@
if test -n "$RANLIB"; then
case $host_os in
openbsd*)
- old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
;;
*)
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
;;
esac
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
@@ -218,6 +219,14 @@
[pic_mode=default])
test -z "$pic_mode" && pic_mode=default
+# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
+#
+# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
+# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
+# calls AC_LIBTOOL_CONFIG and creates libtool.
+#
+_LT_VERSION_CHECK
+
# Use C for the default configuration in the libtool script
tagname=
AC_LIBTOOL_LANG_C_CONFIG
@@ -225,6 +234,41 @@
])# AC_LIBTOOL_SETUP
+# _LT_VERSION_CHECK
+# -----------------
+AC_DEFUN([_LT_VERSION_CHECK],
+[AC_MSG_CHECKING([for correct ltmain.sh version])
+if test "x$ltmain" = "x" ; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([
+
+*** @<:@Gentoo@:>@ sanity check failed! ***
+*** \$ltmain is not defined, please check the patch for consistency! ***
+])
+fi
+gentoo_lt_version="1.5.22"
+gentoo_ltmain_version=`sed -n '/^[[ ]]*VERSION=/{s/^[[ ]]*VERSION=//;p;q;}' "$ltmain"`
+if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([
+
+*** @<:@Gentoo@:>@ sanity check failed! ***
+*** libtool.m4 and ltmain.sh have a version mismatch! ***
+*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
+
+Please run:
+
+ libtoolize --copy --force
+
+if appropriate, please contact the maintainer of this
+package (or your distribution) for help.
+])
+else
+ AC_MSG_RESULT(yes)
+fi
+])# _LT_VERSION_CHECK
+
+
# _LT_AC_SYS_COMPILER
# -------------------
AC_DEFUN([_LT_AC_SYS_COMPILER],
@@ -233,6 +277,9 @@
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
# Allow CC to be a program name with arguments.
compiler=$CC
])# _LT_AC_SYS_COMPILER
@@ -261,7 +308,7 @@
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
[ac_outfile=conftest.$ac_objext
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
])# _LT_COMPILER_BOILERPLATE
@@ -274,7 +321,7 @@
AC_DEFUN([_LT_LINKER_BOILERPLATE],
[ac_outfile=conftest.$ac_objext
printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
])# _LT_LINKER_BOILERPLATE
@@ -580,6 +627,22 @@
CFLAGS="$SAVE_CFLAGS"
fi
;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *) LD="${LD-ld} -64" ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
@@ -622,9 +685,9 @@
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
- $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
- $SED '/^$/d' conftest.err >conftest.er2
- if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
$2=yes
fi
fi
@@ -655,8 +718,8 @@
if test -s conftest.err; then
# Append any errors to the config.log.
cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
- $SED '/^$/d' conftest.err >conftest.er2
+ $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if diff conftest.exp conftest.er2 >/dev/null; then
$2=yes
fi
@@ -731,6 +794,12 @@
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
osf*)
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -744,6 +813,17 @@
esac
fi
;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
*)
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
@@ -775,7 +855,7 @@
# _LT_AC_CHECK_DLFCN
-# --------------------
+# ------------------
AC_DEFUN([_LT_AC_CHECK_DLFCN],
[AC_CHECK_HEADERS(dlfcn.h)dnl
])# _LT_AC_CHECK_DLFCN
@@ -783,7 +863,7 @@
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ------------------------------------------------------------------
+# ---------------------------------------------------------------------
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
if test "$cross_compiling" = yes; then :
@@ -849,6 +929,8 @@
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
/* dlclose (self); */
}
+ else
+ puts (dlerror ());
exit (status);
}]
@@ -859,7 +941,7 @@
case x$lt_status in
x$lt_dlno_uscore) $1 ;;
x$lt_dlneed_uscore) $2 ;;
- x$lt_unknown|x*) $3 ;;
+ x$lt_dlunknown|x*) $3 ;;
esac
else :
# compilation failed
@@ -871,7 +953,7 @@
# AC_LIBTOOL_DLOPEN_SELF
-# -------------------
+# ----------------------
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
if test "x$enable_dlopen" != xyes; then
@@ -942,7 +1024,7 @@
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
save_LDFLAGS="$LDFLAGS"
- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
save_LIBS="$LIBS"
LIBS="$lt_cv_dlopen_libs $LIBS"
@@ -955,7 +1037,7 @@
])
if test "x$lt_cv_dlopen_self" = xyes; then
- LDFLAGS="$LDFLAGS $link_static_flag"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
lt_cv_dlopen_self_static, [dnl
_LT_AC_TRY_DLOPEN_SELF(
@@ -1015,9 +1097,9 @@
then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
- $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
- $SED '/^$/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
fi
fi
@@ -1317,6 +1399,30 @@
esac
;;
+ linux*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+ if test $supports_anon_versioning = yes; then
+ archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ else
+ $archive_expsym_cmds="$archive_cmds"
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
*)
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
@@ -1381,7 +1487,14 @@
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -1392,6 +1505,12 @@
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -1402,10 +1521,15 @@
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
- *) # from 3.2 on
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
+ freebsd*) # from 4.6 on
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
esac
;;
@@ -1465,6 +1589,18 @@
postinstall_cmds='chmod 555 $lib'
;;
+interix3*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
@@ -1586,6 +1722,7 @@
openbsd*)
version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
case $host_os in
@@ -1629,13 +1766,6 @@
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
-sco3.2v5*)
- version_type=osf
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
solaris*)
version_type=linux
need_lib_prefix=no
@@ -1661,7 +1791,7 @@
need_version=yes
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
@@ -1694,6 +1824,29 @@
fi
;;
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ shlibpath_overrides_runpath=no
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ shlibpath_overrides_runpath=yes
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
uts4*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -1707,6 +1860,11 @@
esac
AC_MSG_RESULT([$dynamic_linker])
test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
@@ -1731,6 +1889,9 @@
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
fi
fi
+ if test -z "$LTCFLAGS"; then
+ eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+ fi
# Extract list of available tagged configurations in $ofile.
# Note that this assumes the entire list is on one line.
@@ -1859,7 +2020,7 @@
# AC_DISABLE_SHARED
# -----------------
-#- set the default shared flag to --disable-shared
+# set the default shared flag to --disable-shared
AC_DEFUN([AC_DISABLE_SHARED],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_SHARED(no)
@@ -2167,7 +2328,7 @@
case $host_os in
darwin*)
if test "$GCC" = yes; then
- reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
else
reload_cmds='$LD$reload_flag -o $output$reload_objs'
fi
@@ -2267,6 +2428,11 @@
esac
;;
+interix3*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
irix5* | irix6* | nonstopux*)
case $LD in
*-32|*"-32 ") libmagic=32-bit;;
@@ -2312,15 +2478,11 @@
lt_cv_deplibs_check_method=pass_all
;;
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
case $host_vendor in
motorola)
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
@@ -2341,10 +2503,13 @@
siemens)
lt_cv_deplibs_check_method=pass_all
;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
;;
-sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
lt_cv_deplibs_check_method=pass_all
;;
esac
@@ -2364,36 +2529,43 @@
# Let the user override the test.
lt_cv_path_NM="$NM"
else
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/${ac_tool_prefix}nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
break
;;
*)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
;;
esac
- esac
- fi
+ fi
+ done
+ IFS="$lt_save_ifs"
done
- IFS="$lt_save_ifs"
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi])
NM="$lt_cv_path_NM"
@@ -2499,7 +2671,7 @@
])# _LT_AC_LANG_CXX
# _LT_AC_PROG_CXXCPP
-# ---------------
+# ------------------
AC_DEFUN([_LT_AC_PROG_CXXCPP],
[
AC_REQUIRE([AC_PROG_CXX])
@@ -2548,7 +2720,7 @@
# AC_LIBTOOL_RC
-# --------------
+# -------------
# enable support for Windows resource files
AC_DEFUN([AC_LIBTOOL_RC],
[AC_REQUIRE([LT_AC_PROG_RC])
@@ -2585,37 +2757,6 @@
_LT_COMPILER_BOILERPLATE
_LT_LINKER_BOILERPLATE
-#
-# Check for any special shared library compilation flags.
-#
-_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
-if test "$GCC" = no; then
- case $host_os in
- sco3.2v5*)
- _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
- ;;
- esac
-fi
-if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
- AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
- if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
- else
- AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
- _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
- fi
-fi
-
-
-#
-# Check to make sure the static flag actually works.
-#
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
- _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
- $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
- [],
- [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
-
-
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
AC_LIBTOOL_PROG_COMPILER_PIC($1)
AC_LIBTOOL_PROG_CC_C_O($1)
@@ -2624,9 +2765,9 @@
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF($1)
+AC_LIBTOOL_DLOPEN_SELF
-# Report which librarie types wil actually be built
+# Report which library types will actually be built
AC_MSG_CHECKING([if libtool supports shared libraries])
AC_MSG_RESULT([$can_build_shared])
@@ -2685,6 +2826,7 @@
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
_LT_AC_TAGVAR(module_cmds, $1)=
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
@@ -2712,7 +2854,7 @@
lt_simple_compile_test_code="int some_variable = 0;\n"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER
@@ -2731,12 +2873,12 @@
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
else
- unset lt_cv_prog_gnu_ld
+ $as_unset lt_cv_prog_gnu_ld
fi
if test -n "${lt_cv_path_LDCXX+set}"; then
lt_cv_path_LD=$lt_cv_path_LDCXX
else
- unset lt_cv_path_LD
+ $as_unset lt_cv_path_LD
fi
test -z "${LDCXX+set}" || LD=$LDCXX
CC=${CXX-"c++"}
@@ -2831,6 +2973,7 @@
;;
esac
done
+ ;;
esac
exp_sym_flag='-bexport'
@@ -2868,6 +3011,7 @@
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
fi
+ ;;
esac
shared_flag='-shared'
if test "$aix_use_runtimelinking" = yes; then
@@ -2899,12 +3043,12 @@
_LT_AC_SYS_LIBPATH_AIX
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
else
if test "$host_cpu" = ia64; then
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an empty executable.
_LT_AC_SYS_LIBPATH_AIX
@@ -2913,16 +3057,26 @@
# -berok will link without error, but may produce a broken library.
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # -bexpall does not export symbols beginning with underscore (_)
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
# Exported symbols can be pulled into shared objects from archives
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
# This is similar to how AIX traditionally builds its shared libraries.
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
+
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3(a)best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
chorus*)
case $cc_basename in
*)
@@ -2932,7 +3086,6 @@
esac
;;
-
cygwin* | mingw* | pw32*)
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
@@ -2942,7 +3095,7 @@
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
@@ -2951,7 +3104,7 @@
echo EXPORTS > $output_objdir/$soname.def;
cat $export_symbols >> $output_objdir/$soname.def;
fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
_LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
@@ -3088,34 +3241,23 @@
;;
hpux10*|hpux11*)
if test $with_gnu_ld = no; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
case $host_cpu in
- hppa*64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ hppa*64*|ia64*)
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
;;
- ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- ;;
*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
;;
esac
fi
case $host_cpu in
- hppa*64*)
+ hppa*64*|ia64*)
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
- ia64*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
*)
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
@@ -3131,9 +3273,12 @@
;;
aCC*)
case $host_cpu in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ hppa*64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
+ ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
@@ -3152,9 +3297,12 @@
if test "$GXX" = yes; then
if test $with_gnu_ld = no; then
case $host_cpu in
- ia64*|hppa*64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ hppa*64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
+ ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
@@ -3167,6 +3315,20 @@
;;
esac
;;
+ interix3*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
irix5* | irix6*)
case $cc_basename in
CC*)
@@ -3449,19 +3611,6 @@
# FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
- sco*)
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
sunos4*)
case $cc_basename in
CC*)
@@ -3554,9 +3703,60 @@
;;
esac
;;
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
;;
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ # So that behaviour is only enabled if SCOABSPATH is set to a
+ # non-empty value in the environment. Most likely only useful for
+ # creating official distributions of packages.
+ # This is a hack until libtool officially supports absolute path
+ # names for shared libraries.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
tandem*)
case $cc_basename in
NCC*)
@@ -3592,8 +3792,6 @@
AC_LIBTOOL_PROG_LD_SHLIBS($1)
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF($1)
AC_LIBTOOL_CONFIG($1)
@@ -3611,7 +3809,7 @@
])# AC_LIBTOOL_LANG_CXX_CONFIG
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
-# ------------------------
+# ------------------------------------
# Figure out "hidden" library dependencies from verbose
# compiler output when linking a shared library.
# Parse the compiler output and extract the necessary
@@ -3744,6 +3942,14 @@
# PORTME: override above test on systems where it is broken
ifelse([$1],[CXX],
[case $host_os in
+interix3*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_AC_TAGVAR(predep_objects,$1)=
+ _LT_AC_TAGVAR(postdep_objects,$1)=
+ _LT_AC_TAGVAR(postdeps,$1)=
+ ;;
+
solaris*)
case $cc_basename in
CC*)
@@ -3753,6 +3959,7 @@
_LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
;;
esac
+ ;;
esac
])
@@ -3762,7 +3969,7 @@
])# AC_LIBTOOL_POSTDEP_PREDEP
# AC_LIBTOOL_LANG_F77_CONFIG
-# ------------------------
+# --------------------------
# Ensure that the configuration vars for the C compiler are
# suitably defined. Those variables are subsequently used by
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
@@ -3846,8 +4053,6 @@
test "$enable_shared" = yes || enable_static=yes
AC_MSG_RESULT([$enable_static])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
_LT_AC_TAGVAR(GCC, $1)="$G77"
_LT_AC_TAGVAR(LD, $1)="$LD"
@@ -3857,9 +4062,7 @@
AC_LIBTOOL_PROG_LD_SHLIBS($1)
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-
AC_LIBTOOL_CONFIG($1)
AC_LANG_POP
@@ -3915,8 +4118,6 @@
AC_LIBTOOL_PROG_LD_SHLIBS($1)
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF($1)
AC_LIBTOOL_CONFIG($1)
@@ -3926,7 +4127,7 @@
# AC_LIBTOOL_LANG_RC_CONFIG
-# --------------------------
+# -------------------------
# Ensure that the configuration vars for the Windows resource compiler are
# suitably defined. Those variables are subsequently used by
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
@@ -3989,7 +4190,7 @@
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
SED SHELL STRIP \
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
@@ -4158,6 +4359,9 @@
# A C compiler.
LTCC=$lt_LTCC
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
# A language-specific compiler.
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
@@ -4531,9 +4735,18 @@
osf*)
symcode='[[BCDEGQRST]]'
;;
-solaris* | sysv5*)
+solaris*)
symcode='[[BDRT]]'
;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
sysv4)
symcode='[[DFNSTU]]'
;;
@@ -4716,6 +4929,10 @@
# DJGPP does not support shared libraries at all
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
;;
+ interix3*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
sysv4*MP*)
if test -d /usr/nec; then
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
@@ -4785,14 +5002,14 @@
case $cc_basename in
CC*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
if test "$host_cpu" != ia64; then
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
fi
;;
aCC*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
case $host_cpu in
hppa*64*|ia64*)
# +Z the default
@@ -4806,6 +5023,10 @@
;;
esac
;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
irix5* | irix6* | nonstopux*)
case $cc_basename in
CC*)
@@ -4885,15 +5106,6 @@
;;
psos*)
;;
- sco*)
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- *)
- ;;
- esac
- ;;
solaris*)
case $cc_basename in
CC*)
@@ -4935,7 +5147,14 @@
;;
esac
;;
- unixware*)
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
;;
vxworks*)
;;
@@ -4982,6 +5201,11 @@
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
;;
+ interix3*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
msdosdjgpp*)
# Just because we use GCC doesn't mean we suddenly get shared libraries
# on systems that don't support them.
@@ -5096,11 +5320,6 @@
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
- sco3.2v5*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
- ;;
-
solaris*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -5118,7 +5337,7 @@
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ sysv4 | sysv4.2uw2* | sysv4.3*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -5131,6 +5350,12 @@
fi
;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
unicos*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
@@ -5172,6 +5397,16 @@
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
;;
esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
])
@@ -5250,6 +5485,10 @@
with_gnu_ld=no
fi
;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
openbsd*)
with_gnu_ld=no
;;
@@ -5334,7 +5573,7 @@
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
@@ -5343,12 +5582,27 @@
echo EXPORTS > $output_objdir/$soname.def;
cat $export_symbols >> $output_objdir/$soname.def;
fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
_LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
;;
+ interix3*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
@@ -5390,7 +5644,7 @@
fi
;;
- solaris* | sysv5*)
+ solaris*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
_LT_AC_TAGVAR(ld_shlibs, $1)=no
cat <<EOF 1>&2
@@ -5411,6 +5665,33 @@
fi
;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
sunos4*)
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
wlarc=
@@ -5444,7 +5725,7 @@
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- if test "$GCC" = yes && test -z "$link_static_flag"; then
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
@@ -5478,6 +5759,7 @@
break
fi
done
+ ;;
esac
exp_sym_flag='-bexport'
@@ -5515,6 +5797,7 @@
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
fi
+ ;;
esac
shared_flag='-shared'
if test "$aix_use_runtimelinking" = yes; then
@@ -5527,11 +5810,11 @@
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
+ if test "$aix_use_runtimelinking" = yes; then
shared_flag='${wl}-G'
else
shared_flag='${wl}-bM:SRE'
- fi
+ fi
fi
fi
@@ -5545,12 +5828,12 @@
# Determine the default libpath from the value encoded in an empty executable.
_LT_AC_SYS_LIBPATH_AIX
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
else
if test "$host_cpu" = ia64; then
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an empty executable.
_LT_AC_SYS_LIBPATH_AIX
@@ -5559,13 +5842,11 @@
# -berok will link without error, but may produce a broken library.
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # -bexpall does not export symbols beginning with underscore (_)
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
# Exported symbols can be pulled into shared objects from archives
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
# This is similar to how AIX traditionally builds its shared libraries.
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
@@ -5706,47 +5987,62 @@
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
;;
- hpux10* | hpux11*)
+ hpux10*)
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
case $host_cpu in
- hppa*64*|ia64*)
+ hppa*64*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
+ ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
case $host_cpu in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hppa*64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
+ ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
fi
if test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
case $host_cpu in
- hppa*64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ hppa*64*|ia64*)
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
- ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
@@ -5848,14 +6144,6 @@
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
;;
- sco3.2v5*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ;;
-
solaris*)
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
if test "$GCC" = yes; then
@@ -5941,36 +6229,45 @@
fi
;;
- sysv4.2uw2*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
- ;;
+ runpath_var='LD_RUN_PATH'
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
- runpath_var='LD_RUN_PATH'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
- sysv5*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
;;
uts4*)
@@ -5988,11 +6285,6 @@
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
#
# Do we need to explicitly link libc?
#
@@ -6020,6 +6312,7 @@
libobjs=conftest.$ac_objext
deplibs=
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
compiler_flags=-v
linker_flags=-v
verstring=
Modified: freeswitch/branches/stkn/build/config/config.guess
==============================================================================
--- freeswitch/branches/stkn/build/config/config.guess (original)
+++ freeswitch/branches/stkn/build/config/config.guess Mon Jul 10 11:15:11 2006
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-07-08'
+timestamp='2006-02-27'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -138,6 +139,23 @@
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
+ eval $set_cc_for_build
+ cat << EOF > $dummy.c
+ #include <features.h>
+ #ifdef __UCLIBC__
+ # ifdef __UCLIBC_CONFIG_VERSION__
+ LIBC=uclibc __UCLIBC_CONFIG_VERSION__
+ # else
+ LIBC=uclibc
+ # endif
+ #else
+ LIBC=gnu
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
+fi
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -206,6 +224,9 @@
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
@@ -764,7 +785,12 @@
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -772,6 +798,9 @@
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
+ i*:MSYS_NT-*:*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
@@ -779,9 +808,12 @@
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ x86:Interix*:[345]*)
+ echo i586-pc-interix${UNAME_RELEASE}
exit ;;
+ EM64T:Interix*:[345]*)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
@@ -794,7 +826,7 @@
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
- amd64:CYGWIN*:*:*)
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)
@@ -815,25 +847,25 @@
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo cris-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo crisv32-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo frv-unknown-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:*)
eval $set_cc_for_build
@@ -851,8 +883,12 @@
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
@@ -870,14 +906,21 @@
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-${LIBC}
+ exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -890,34 +933,37 @@
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo x86_64-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
@@ -932,20 +978,22 @@
p'`
case "$ld_supported_targets" in
elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
;;
a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
exit ;;
coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
exit ;;
esac
+ # This should get integrated into the C code below, but now we hack
+ if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -961,7 +1009,7 @@
LIBC=gnulibc1
# endif
#else
- #ifdef __INTEL_COMPILER
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
LIBC=gnu
#else
LIBC=gnuaout
@@ -971,7 +1019,11 @@
LIBC=dietlibc
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
@@ -1182,7 +1234,6 @@
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
- *86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1260,6 +1311,9 @@
exit ;;
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
exit ;;
esac
Modified: freeswitch/branches/stkn/build/config/config.sub
==============================================================================
--- freeswitch/branches/stkn/build/config/config.sub (original)
+++ freeswitch/branches/stkn/build/config/config.sub Mon Jul 10 11:15:11 2006
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-07-08'
+timestamp='2006-02-27'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -119,8 +120,9 @@
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -171,6 +173,10 @@
-hiux*)
os=-hiuxwe2
;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -187,6 +193,10 @@
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -234,12 +244,12 @@
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| bfin \
| c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
+ | d10v | d30v | dlx | dsp16xx | dvp \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -257,17 +267,18 @@
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
- | ms1 \
+ | mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | shbe | sheb | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
@@ -286,6 +297,9 @@
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -336,19 +350,20 @@
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
- | ms1-* \
+ | mt-* \
| msp430-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | shbe-* | sheb-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
@@ -678,6 +693,24 @@
basic_machine=m68k-atari
os=-mint
;;
+ mipsEE* | ee | ps2)
+ basic_machine=mips64r5900el-scei
+ case $os in
+ -linux*)
+ ;;
+ *)
+ os=-elf
+ ;;
+ esac
+ ;;
+ iop)
+ basic_machine=mipsel-scei
+ os=-irx
+ ;;
+ dvp)
+ basic_machine=dvp-scei
+ os=-elf
+ ;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
@@ -696,6 +729,9 @@
basic_machine=i386-pc
os=-msdos
;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -803,6 +839,12 @@
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -859,6 +901,10 @@
basic_machine=i586-unknown
os=-pw32
;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -1101,7 +1147,7 @@
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1174,21 +1220,23 @@
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku*)
+ | -skyos* | -haiku* | -rdos* | -irx*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
Modified: freeswitch/branches/stkn/build/config/ltmain.sh
==============================================================================
--- freeswitch/branches/stkn/build/config/ltmain.sh (original)
+++ freeswitch/branches/stkn/build/config/ltmain.sh Mon Jul 10 11:15:11 2006
@@ -33,6 +33,9 @@
# function.
progpath="$0"
+# define SED for historic ltconfig's generated by Libtool 1.3
+test -z "$SED" && SED=sed
+
# The name of this program:
progname=`echo "$progpath" | $SED $basename`
modename="$progname"
@@ -43,14 +46,21 @@
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION=1.5.18
-TIMESTAMP=" (1.1220.2.245 2005/05/16 08:55:27)"
+VERSION=1.5.22
+TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
+# Same for EGREP, and just to be sure, do LTCC as well
+if test "X$EGREP" = X ; then
+ EGREP=egrep
+fi
+if test "X$LTCC" = X ; then
+ LTCC=${CC-gcc}
+fi
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
@@ -88,14 +98,15 @@
Xsed="${SED}"' -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
# test EBCDIC or ASCII
-case `echo A|tr A '\301'` in
- A) # EBCDIC based system
- SP2NL="tr '\100' '\n'"
- NL2SP="tr '\r\n' '\100\100'"
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ SP2NL='tr \040 \012'
+ NL2SP='tr \015\012 \040\040'
;;
- *) # Assume ASCII based system
- SP2NL="tr '\040' '\012'"
- NL2SP="tr '\015\012' '\040\040'"
+ *) # EBCDIC based system
+ SP2NL='tr \100 \n'
+ NL2SP='tr \r\n \100\100'
;;
esac
@@ -131,14 +142,76 @@
show="$echo"
show_help=
execute_dlfiles=
+duplicate_deps=no
+preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
-quote_scanset='[[~#^*{};<>?'"'"' ]'
+if test -z "$max_cmd_len"; then
+ i=0
+ testring="ABCD"
+ new_result=
+
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
+ = "XX$testring") >/dev/null 2>&1 &&
+ new_result=`expr "X$testring" : ".*" 2>&1` &&
+ max_cmd_len="$new_result" &&
+ test "$i" != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ testring="$testring$testring"
+ done
+ testring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ max_cmd_len=`expr $max_cmd_len \/ 2`
+fi
+
#####################################
# Shell function definitions:
# This seems to be the best place for them
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $mkdir "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || {
+ $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
+ exit $EXIT_FAILURE
+ }
+ fi
+
+ $echo "X$my_tmpdir" | $Xsed
+}
+
+
# func_win32_libid arg
# return the library type of file 'arg'
#
@@ -157,12 +230,11 @@
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 | \
- sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
- if test "X$win32_nmres" = "Ximport" ; then
- win32_libid_type="x86 archive import"
- else
- win32_libid_type="x86 archive static"
- fi
+ $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
fi
;;
*DLL*)
@@ -192,7 +264,7 @@
CC_quoted=
for arg in $CC; do
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -213,13 +285,27 @@
for arg in $CC; do
# Double-quote args containing other shell metacharacters.
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
CC_quoted="$CC_quoted $arg"
done
+ # user sometimes does CC=<HOST>-gcc so we need to match that to 'gcc'
+ trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"`
+ # and sometimes libtool has CC=<HOST>-gcc but user does CC=gcc
+ extendcc=${host}-${CC}
+ # and sometimes libtool has CC=<OLDHOST>-gcc but user has CC=<NEWHOST>-gcc
+ # (Gentoo-specific hack because we always export $CHOST)
+ mungedcc=${CHOST-${host}}-${trimedcc}
case "$@ " in
+ "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\
+ "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*)
+ tagname=CC
+ break ;;
+ "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\
+ "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\
+ "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
@@ -295,9 +381,9 @@
$run ${rm}r "$my_xdir"
$show "$mkdir $my_xdir"
$run $mkdir "$my_xdir"
- status=$?
- if test "$status" -ne 0 && test ! -d "$my_xdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+ exit $exit_status
fi
case $host in
*-darwin*)
@@ -337,7 +423,7 @@
func_extract_an_archive "$my_xdir" "$my_xabs"
fi # $darwin_arches
fi # $run
- ;;
+ ;;
*)
func_extract_an_archive "$my_xdir" "$my_xabs"
;;
@@ -352,6 +438,8 @@
# Darwin sucks
eval std_shrext=\"$shrext_cmds\"
+disable_libs=no
+
# Parse our command line options once, thoroughly.
while test "$#" -gt 0
do
@@ -468,7 +556,11 @@
preserve_args="$preserve_args $arg"
;;
- --tag) prevopt="--tag" prev=tag ;;
+ --tag)
+ prevopt="--tag"
+ prev=tag
+ preserve_args="$preserve_args --tag"
+ ;;
--tag=*)
set tag "$optarg" ${1+"$@"}
shift
@@ -500,6 +592,18 @@
exit $EXIT_FAILURE
fi
+case $disable_libs in
+no)
+ ;;
+shared)
+ build_libtool_libs=no
+ build_old_libs=yes
+ ;;
+static)
+ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+ ;;
+esac
+
# If this variable is set in any of the actions, the command in it
# will be execed at the end. This prevents here-documents from being
# left over by shells.
@@ -576,7 +680,7 @@
for arg
do
- case "$arg_mode" in
+ case $arg_mode in
arg )
# do not "continue". Instead, add this to base_compile
lastarg="$arg"
@@ -627,7 +731,7 @@
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -662,7 +766,7 @@
# in scan sets (worked around with variable expansion),
# and furthermore cannot handle '|' '&' '(' ')' in scan sets
# at all, so we specify them separately.
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
lastarg="\"$lastarg\""
;;
esac
@@ -737,13 +841,12 @@
qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
case $qlibobj in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
qlibobj="\"$qlibobj\"" ;;
esac
- if test "X$libobj" != "X$qlibobj"; then
- $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
- exit $EXIT_FAILURE
- fi
+ test "X$libobj" != "X$qlibobj" \
+ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
@@ -796,7 +899,7 @@
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
- until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+ until $run ln "$srcfile" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed"
sleep 2
done
@@ -824,7 +927,7 @@
fi
qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
case $qsrcfile in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
qsrcfile="\"$qsrcfile\"" ;;
esac
@@ -857,9 +960,9 @@
if test ! -d "${xdir}$objdir"; then
$show "$mkdir ${xdir}$objdir"
$run $mkdir ${xdir}$objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+ exit $exit_status
fi
fi
@@ -1062,6 +1165,7 @@
no_install=no
objs=
non_pic_objects=
+ notinst_path= # paths that contain not-installed libtool libraries
precious_files_regex=
prefer_static_libs=no
preload=no
@@ -1090,14 +1194,15 @@
if test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
+ prefer_static_libs=yes
else
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
+ prefer_static_libs=built
fi
build_libtool_libs=no
build_old_libs=yes
- prefer_static_libs=yes
break
;;
esac
@@ -1111,7 +1216,7 @@
arg="$1"
shift
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
;;
*) qarg=$arg ;;
@@ -1272,6 +1377,11 @@
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
@@ -1355,8 +1465,8 @@
prev=
continue
;;
- darwin_framework)
- compiler_flags="$compiler_flags $arg"
+ darwin_framework|darwin_framework_skip)
+ test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
prev=
@@ -1420,13 +1530,17 @@
continue
;;
- -framework)
- prev=darwin_framework
- compiler_flags="$compiler_flags $arg"
+ -framework|-arch|-isysroot)
+ case " $CC " in
+ *" ${arg} ${1} "* | *" ${arg} ${1} "*)
+ prev=darwin_framework_skip ;;
+ *) compiler_flags="$compiler_flags $arg"
+ prev=darwin_framework ;;
+ esac
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
- continue
- ;;
+ continue
+ ;;
-inst-prefix-dir)
prev=inst_prefix
@@ -1454,7 +1568,8 @@
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit $EXIT_FAILURE
+ absdir="$dir"
+ notinst_path="$notinst_path $dir"
fi
dir="$absdir"
;;
@@ -1468,10 +1583,15 @@
esac
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
*) dllsearchpath="$dllsearchpath:$dir";;
esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
;;
esac
continue
@@ -1480,11 +1600,11 @@
-l*)
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
- *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
# These systems don't actually have a C or math library (as such)
continue
;;
- *-*-mingw* | *-*-os2*)
+ *-*-os2*)
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
@@ -1496,6 +1616,15 @@
# Rhapsody C and math libraries are in the System framework
deplibs="$deplibs -framework System"
continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
esac
elif test "X$arg" = "X-lc_r"; then
case $host in
@@ -1537,21 +1666,24 @@
# +DA*, +DD* enable 64-bit mode on the HP compiler
# -q* pass through compiler args for the IBM compiler
# -m* pass through architecture-specific compiler args for GCC
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -pg pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+ -t[45]*|-txscale*|@*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
- if test "$with_gcc" = "yes" ; then
- compiler_flags="$compiler_flags $arg"
- fi
+ compiler_flags="$compiler_flags $arg"
continue
;;
@@ -1659,7 +1791,7 @@
for flag in $args; do
IFS="$save_ifs"
case $flag in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
esac
@@ -1677,7 +1809,7 @@
for flag in $args; do
IFS="$save_ifs"
case $flag in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
esac
@@ -1710,7 +1842,7 @@
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -1789,6 +1921,11 @@
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
@@ -1844,7 +1981,7 @@
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -1894,9 +2031,9 @@
if test ! -d "$output_objdir"; then
$show "$mkdir $output_objdir"
$run $mkdir $output_objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "$output_objdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+ exit $exit_status
fi
fi
@@ -1959,7 +2096,6 @@
newlib_search_path=
need_relink=no # whether we're linking any uninstalled libtool libraries
notinst_deplibs= # not-installed libtool libraries
- notinst_path= # paths that contain not-installed libtool libraries
case $linkmode in
lib)
passes="conv link"
@@ -2195,7 +2331,7 @@
esac # case $deplib
if test "$found" = yes || test -f "$lib"; then :
else
- $echo "$modename: cannot find the library \`$lib'" 1>&2
+ $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
exit $EXIT_FAILURE
fi
@@ -2409,7 +2545,7 @@
case "$temp_rpath " in
*" $dir "*) ;;
*" $absdir "*) ;;
- *) temp_rpath="$temp_rpath $dir" ;;
+ *) temp_rpath="$temp_rpath $absdir" ;;
esac
fi
@@ -2446,8 +2582,12 @@
fi
link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes ; then
+ use_static_libs=no
+ fi
if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
if test "$installed" = no; then
notinst_deplibs="$notinst_deplibs $lib"
need_relink=yes
@@ -2560,11 +2700,15 @@
if test "$hardcode_direct" = no; then
add="$dir/$linklib"
case $host in
- *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
*-*-darwin* )
# if the lib is a module then we can not link against
# it, someone is ignoring the new warnings I added
- if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+ if /usr/bin/file -L $add 2> /dev/null |
+ $EGREP ": [^:]* bundle" >/dev/null ; then
$echo "** Warning, lib $linklib is a module, not a shared library"
if test -z "$old_library" ; then
$echo
@@ -2595,7 +2739,7 @@
add_dir="-L$dir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
- case "$libdir" in
+ case $libdir in
[\\/]*)
add_dir="$add_dir -L$inst_prefix_dir$libdir"
;;
@@ -2668,7 +2812,7 @@
add_dir="-L$libdir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
- case "$libdir" in
+ case $libdir in
[\\/]*)
add_dir="$add_dir -L$inst_prefix_dir$libdir"
;;
@@ -2729,8 +2873,6 @@
fi
fi
else
- convenience="$convenience $dir/$old_library"
- old_convenience="$old_convenience $dir/$old_library"
deplibs="$dir/$old_library $deplibs"
link_static=yes
fi
@@ -3317,9 +3459,9 @@
# Eliminate all temporary directories.
for path in $notinst_path; do
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
- deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
+ lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+ deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+ dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
done
if test -n "$xrpath"; then
@@ -3372,8 +3514,13 @@
;;
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
*)
# Add libc to deplibs on all other systems if necessary.
if test "$build_libtool_need_lc" = "yes"; then
@@ -3416,11 +3563,11 @@
int main() { return 0; }
EOF
$rm conftest
- $LTCC -o conftest conftest.c $deplibs
+ $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
for i in $deplibs; do
- name="`expr $i : '-l\(.*\)'`"
+ name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" -ne "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
@@ -3457,11 +3604,11 @@
# Error occurred in the first compile. Let's try to salvage
# the situation: Compile a separate program for each library.
for i in $deplibs; do
- name="`expr $i : '-l\(.*\)'`"
+ name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- $LTCC -o conftest conftest.c $i
+ $LTCC $LTCFLAGS -o conftest conftest.c $i
# Did it work?
if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
@@ -3509,7 +3656,7 @@
set dummy $deplibs_check_method
file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
for a_deplib in $deplibs; do
- name="`expr $a_deplib : '-l\(.*\)'`"
+ name=`expr $a_deplib : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
@@ -3543,6 +3690,13 @@
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
esac
done
+ # It is ok to link against an archive when
+ # building a shared library.
+ if $AR -t $potlib > /dev/null 2>&1; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
| ${SED} 10q \
| $EGREP "$file_magic_regex" > /dev/null; then
@@ -3578,7 +3732,7 @@
set dummy $deplibs_check_method
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
for a_deplib in $deplibs; do
- name="`expr $a_deplib : '-l\(.*\)'`"
+ name=`expr $a_deplib : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test -n "$name" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
@@ -3708,6 +3862,35 @@
deplibs=$newdeplibs
fi
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+
# All the library-specific variables (install_libdir is set above).
library_names=
old_library=
@@ -3791,6 +3974,7 @@
fi
lib="$output_objdir/$realname"
+ linknames=
for link
do
linknames="$linknames $link"
@@ -3819,6 +4003,9 @@
# The command line is too long to execute in one step.
$show "using reloadable object file for export list..."
skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
fi
done
IFS="$save_ifs"
@@ -3888,7 +4075,8 @@
fi
fi
- if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
+ if test "X$skipped_export" != "X:" &&
+ len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
:
else
@@ -3923,7 +4111,7 @@
do
eval test_cmds=\"$reload_cmds $objlist $last_robj\"
if test "X$objlist" = X ||
- { len=`expr "X$test_cmds" : ".*"` &&
+ { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
test "$len" -le "$max_cmd_len"; }; then
objlist="$objlist $obj"
else
@@ -4013,13 +4201,30 @@
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
- $run eval "$cmd" || exit $?
+ $run eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+ fi
+
+ exit $lt_exit
+ }
done
IFS="$save_ifs"
# Restore the uninstalled library and exit
if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ fi
+ fi
+
exit $EXIT_SUCCESS
fi
@@ -4201,6 +4406,35 @@
;;
esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
@@ -4245,10 +4479,15 @@
fi
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
*) dllsearchpath="$dllsearchpath:$libdir";;
esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
;;
esac
done
@@ -4364,11 +4603,23 @@
if test -z "$export_symbols"; then
export_symbols="$output_objdir/$outputname.exp"
$run $rm $export_symbols
- $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* )
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
else
- $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
$run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* )
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
fi
fi
@@ -4485,16 +4736,29 @@
esac
# Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+ $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
# Clean up the generated files.
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
# Transform the symbol file into the correct name.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ case $host in
+ *cygwin* | *mingw* )
+ if test -f "$output_objdir/${outputname}.def" ; then
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ else
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ fi
+ ;;
+ * )
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ ;;
+ esac
;;
*)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
@@ -4519,7 +4783,7 @@
# We have no uninstalled library dependencies, so finalize right now.
$show "$link_command"
$run eval "$link_command"
- status=$?
+ exit_status=$?
# Delete the generated files.
if test -n "$dlsyms"; then
@@ -4527,7 +4791,7 @@
$run $rm "$output_objdir/${outputname}S.${objext}"
fi
- exit $status
+ exit $exit_status
fi
if test -n "$shlibpath_var"; then
@@ -4667,10 +4931,12 @@
esac
case $host in
*cygwin* | *mingw* )
- cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
- cwrapper=`$echo ${output}.exe`
- $rm $cwrappersource $cwrapper
- trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+ output_name=`basename $output`
+ output_path=`dirname $output`
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $rm $cwrappersource $cwrapper
+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
cat > $cwrappersource <<EOF
@@ -4695,6 +4961,9 @@
#include <malloc.h>
#include <stdarg.h>
#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
#if defined(PATH_MAX)
# define LT_PATHMAX PATH_MAX
@@ -4705,16 +4974,20 @@
#endif
#ifndef DIR_SEPARATOR
-#define DIR_SEPARATOR '/'
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
#endif
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
defined (__OS2__)
-#define HAVE_DOS_BASED_FILE_SYSTEM
-#ifndef DIR_SEPARATOR_2
-#define DIR_SEPARATOR_2 '\\'
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
#endif
-#endif
#ifndef DIR_SEPARATOR_2
# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
@@ -4723,17 +4996,32 @@
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
#endif /* DIR_SEPARATOR_2 */
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
if (stale) { free ((void *) stale); stale = 0; } \
} while (0)
+/* -DDEBUG is fairly common in CFLAGS. */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
const char *program_name = NULL;
void * xmalloc (size_t num);
char * xstrdup (const char *string);
-char * basename (const char *name);
-char * fnqualify(const char *path);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int check_executable(const char *path);
char * strendzap(char *str, const char *pat);
void lt_fatal (const char *message, ...);
@@ -4743,29 +5031,51 @@
char **newargz;
int i;
- program_name = (char *) xstrdup ((char *) basename (argv[0]));
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ DEBUG("(main) argv[0] : %s\n",argv[0]);
+ DEBUG("(main) program_name : %s\n",program_name);
newargz = XMALLOC(char *, argc+2);
EOF
- cat >> $cwrappersource <<EOF
- newargz[0] = "$SHELL";
+ cat >> $cwrappersource <<EOF
+ newargz[0] = (char *) xstrdup("$SHELL");
EOF
- cat >> $cwrappersource <<"EOF"
- newargz[1] = fnqualify(argv[0]);
+ cat >> $cwrappersource <<"EOF"
+ newargz[1] = find_executable(argv[0]);
+ if (newargz[1] == NULL)
+ lt_fatal("Couldn't find %s", argv[0]);
+ DEBUG("(main) found exe at : %s\n",newargz[1]);
/* we know the script has the same name, without the .exe */
/* so make sure newargz[1] doesn't end in .exe */
strendzap(newargz[1],".exe");
for (i = 1; i < argc; i++)
newargz[i+1] = xstrdup(argv[i]);
newargz[argc+1] = NULL;
+
+ for (i=0; i<argc+1; i++)
+ {
+ DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
+ ;
+ }
+
EOF
- cat >> $cwrappersource <<EOF
+ case $host_os in
+ mingw*)
+ cat >> $cwrappersource <<EOF
+ execv("$SHELL",(char const **)newargz);
+EOF
+ ;;
+ *)
+ cat >> $cwrappersource <<EOF
execv("$SHELL",newargz);
EOF
+ ;;
+ esac
- cat >> $cwrappersource <<"EOF"
+ cat >> $cwrappersource <<"EOF"
+ return 127;
}
void *
@@ -4785,48 +5095,148 @@
;
}
-char *
-basename (const char *name)
+const char *
+base_name (const char *name)
{
const char *base;
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over the disk name in MSDOS pathnames. */
- if (isalpha (name[0]) && name[1] == ':')
+ if (isalpha ((unsigned char)name[0]) && name[1] == ':')
name += 2;
#endif
for (base = name; *name; name++)
if (IS_DIR_SEPARATOR (*name))
base = name + 1;
- return (char *) base;
+ return base;
}
+int
+check_executable(const char * path)
+{
+ struct stat st;
+
+ DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0) &&
+ (
+ /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+ ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+ ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+ ((st.st_mode & S_IXUSR) == S_IXUSR))
+ )
+ return 1;
+ else
+ return 0;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise */
char *
-fnqualify(const char *path)
+find_executable (const char* wrapper)
{
- size_t size;
- char *p;
+ int has_slash = 0;
+ const char* p;
+ const char* p_next;
+ /* static buffer for getcwd */
char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char* concat_name;
- assert(path != NULL);
+ DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
- /* Is it qualified already? */
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- if (isalpha (path[0]) && path[1] == ':')
- return xstrdup (path);
+ if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
+ else
+ {
#endif
- if (IS_DIR_SEPARATOR (path[0]))
- return xstrdup (path);
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
- /* prepend the current directory */
- /* doesn't handle '~' */
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char* path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char* q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR(*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen(tmp);
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
if (getcwd (tmp, LT_PATHMAX) == NULL)
lt_fatal ("getcwd failed");
- size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
- p = XMALLOC(char, size);
- sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
- return p;
+ tmp_len = strlen(tmp);
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ return NULL;
}
char *
@@ -4870,16 +5280,16 @@
va_end (ap);
}
EOF
- # we should really use a build-platform specific compiler
- # here, but OTOH, the wrappers (shell script and this C one)
- # are only useful if you want to execute the "real" binary.
- # Since the "real" binary is built for $host, then this
- # wrapper might as well be built for $host, too.
- $run $LTCC -s -o $cwrapper $cwrappersource
- ;;
- esac
- $rm $output
- trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+ # we should really use a build-platform specific compiler
+ # here, but OTOH, the wrappers (shell script and this C one)
+ # are only useful if you want to execute the "real" binary.
+ # Since the "real" binary is built for $host, then this
+ # wrapper might as well be built for $host, too.
+ $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+ ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
$echo > $output "\
#! $SHELL
@@ -5024,18 +5434,23 @@
$echo >> $output "\
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
+
+ # Make sure env LD_LIBRARY_PATH does not mess us up
+ if test -n \"\${LD_LIBRARY_PATH+set}\"; then
+ export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH
+ fi
"
case $host in
# Backslashes separate directories on plain windows
*-*-mingw | *-*-os2*)
$echo >> $output "\
- exec \$progdir\\\\\$program \${1+\"\$@\"}
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
"
;;
*)
$echo >> $output "\
- exec \$progdir/\$program \${1+\"\$@\"}
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
"
;;
esac
@@ -5045,7 +5460,7 @@
fi
else
# The program doesn't exist.
- \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+ \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
\$echo \"This script is just a wrapper for \$program.\" 1>&2
$echo \"See the $PACKAGE documentation for more information.\" 1>&2
exit $EXIT_FAILURE
@@ -5109,9 +5524,9 @@
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
- status=$?
- if test "$status" -ne 0 && test ! -d "$gentop"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+ exit $exit_status
fi
fi
@@ -5168,7 +5583,7 @@
oldobjs="$objlist $obj"
objlist="$objlist $obj"
eval test_cmds=\"$old_archive_cmds\"
- if len=`expr "X$test_cmds" : ".*"` &&
+ if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
test "$len" -le "$max_cmd_len"; then
:
else
@@ -5251,9 +5666,53 @@
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE
fi
- newdependency_libs="$newdependency_libs $libdir/$name"
+ if test "X$EGREP" = X ; then
+ EGREP=egrep
+ fi
+ # We do not want portage's install root ($D) present. Check only for
+ # this if the .la is being installed.
+ if test "$installed" = yes && test "$D"; then
+ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ else
+ mynewdependency_lib="$libdir/$name"
+ fi
+ # Do not add duplicates
+ if test "$mynewdependency_lib"; then
+ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+ if test -z "$my_little_ninja_foo_1"; then
+ newdependency_libs="$newdependency_libs $mynewdependency_lib"
+ fi
+ fi
;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
+ *)
+ if test "$installed" = yes; then
+ # Rather use S=WORKDIR if our version of portage supports it.
+ # This is because some ebuild (gcc) do not use $S as buildroot.
+ if test "$PWORKDIR"; then
+ S="$PWORKDIR"
+ fi
+ # We do not want portage's build root ($S) present.
+ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
+ # We do not want portage's install root ($D) present.
+ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
+ if test -n "$my_little_ninja_foo_2" && test "$S"; then
+ mynewdependency_lib=""
+ elif test -n "$my_little_ninja_foo_3" && test "$D"; then
+ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ else
+ mynewdependency_lib="$deplib"
+ fi
+ else
+ mynewdependency_lib="$deplib"
+ fi
+ # Do not add duplicates
+ if test "$mynewdependency_lib"; then
+ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+ if test -z "$my_little_ninja_foo_4"; then
+ newdependency_libs="$newdependency_libs $mynewdependency_lib"
+ fi
+ fi
+ ;;
esac
done
dependency_libs="$newdependency_libs"
@@ -5305,6 +5764,10 @@
case $host,$output,$installed,$module,$dlname in
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
+ # Do not add duplicates
+ if test "$installed" = yes && test "$D"; then
+ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ fi
$echo > $output "\
# $outputname - a libtool library file
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
@@ -5365,11 +5828,11 @@
# install_prog (especially on Windows NT).
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
# Allow the use of GNU shtool's install command.
- $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+ $echo "X$nonopt" | grep shtool > /dev/null; then
# Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -5378,14 +5841,14 @@
shift
else
install_prog=
- arg="$nonopt"
+ arg=$nonopt
fi
# The real first argument should be the name of the installation program.
# Aesthetically quote it.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -5403,28 +5866,31 @@
do
if test -n "$dest"; then
files="$files $dest"
- dest="$arg"
+ dest=$arg
continue
fi
case $arg in
-d) isdir=yes ;;
- -f) prev="-f" ;;
- -g) prev="-g" ;;
- -m) prev="-m" ;;
- -o) prev="-o" ;;
+ -f)
+ case " $install_prog " in
+ *[\\\ /]cp\ *) ;;
+ *) prev=$arg ;;
+ esac
+ ;;
+ -g | -m | -o) prev=$arg ;;
-s)
stripme=" -s"
continue
;;
- -*) ;;
-
+ -*)
+ ;;
*)
# If the previous option needed an argument, then skip it.
if test -n "$prev"; then
prev=
else
- dest="$arg"
+ dest=$arg
continue
fi
;;
@@ -5433,7 +5899,7 @@
# Aesthetically quote the argument.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -5602,11 +6068,14 @@
if test "$#" -gt 0; then
# Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
for linkname
do
if test "$linkname" != "$realname"; then
- $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
- $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+ $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
fi
done
fi
@@ -5619,7 +6088,16 @@
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
- $run eval "$cmd" || exit $?
+ $run eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+ fi
+
+ exit $lt_exit
+ }
done
IFS="$save_ifs"
fi
@@ -5713,17 +6191,15 @@
notinst_deplibs=
relink_command=
- # To insure that "foo" is sourced, and not "foo.exe",
- # finese the cygwin/MSYS system by explicitly sourcing "foo."
- # which disallows the automatic-append-.exe behavior.
- case $build in
- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
- *) wrapperdot=${wrapper} ;;
- esac
+ # Note that it is not necessary on cygwin/mingw to append a dot to
+ # foo even if both foo and FILE.exe exist: automatic-append-.exe
+ # behavior happens only for exec(3), not for open(2)! Also, sourcing
+ # `FILE.' does not work on cygwin managed mounts.
+ #
# If there is no directory component, then add one.
- case $file in
- */* | *\\*) . ${wrapperdot} ;;
- *) . ./${wrapperdot} ;;
+ case $wrapper in
+ */* | *\\*) . ${wrapper} ;;
+ *) . ./${wrapper} ;;
esac
# Check the variables that should have been set.
@@ -5751,34 +6227,21 @@
done
relink_command=
- # To insure that "foo" is sourced, and not "foo.exe",
- # finese the cygwin/MSYS system by explicitly sourcing "foo."
- # which disallows the automatic-append-.exe behavior.
- case $build in
- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
- *) wrapperdot=${wrapper} ;;
- esac
+ # Note that it is not necessary on cygwin/mingw to append a dot to
+ # foo even if both foo and FILE.exe exist: automatic-append-.exe
+ # behavior happens only for exec(3), not for open(2)! Also, sourcing
+ # `FILE.' does not work on cygwin managed mounts.
+ #
# If there is no directory component, then add one.
- case $file in
- */* | *\\*) . ${wrapperdot} ;;
- *) . ./${wrapperdot} ;;
+ case $wrapper in
+ */* | *\\*) . ${wrapper} ;;
+ *) . ./${wrapper} ;;
esac
outputname=
if test "$fast_install" = no && test -n "$relink_command"; then
if test "$finalize" = yes && test -z "$run"; then
- tmpdir="/tmp"
- test -n "$TMPDIR" && tmpdir="$TMPDIR"
- tmpdir="$tmpdir/libtool-$$"
- save_umask=`umask`
- umask 0077
- if $mkdir "$tmpdir"; then
- umask $save_umask
- else
- umask $save_umask
- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
- continue
- fi
+ tmpdir=`func_mktempdir`
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
@@ -5802,7 +6265,7 @@
fi
# remove .exe since cygwin /usr/bin/install will append another
- # one anyways
+ # one anyway
case $install_prog,$host in
*/usr/bin/install*,*cygwin*)
case $file:$destfile in
@@ -5902,7 +6365,7 @@
# Exit here if they wanted silent mode.
test "$show" = : && exit $EXIT_SUCCESS
- $echo "----------------------------------------------------------------------"
+ $echo "X----------------------------------------------------------------------" | $Xsed
$echo "Libraries have been installed in:"
for libdir in $libdirs; do
$echo " $libdir"
@@ -5935,7 +6398,7 @@
$echo
$echo "See any operating system documentation about shared libraries for"
$echo "more information, such as the ld(1) and ld.so(8) manual pages."
- $echo "----------------------------------------------------------------------"
+ $echo "X----------------------------------------------------------------------" | $Xsed
exit $EXIT_SUCCESS
;;
@@ -6152,9 +6615,17 @@
rmfiles="$rmfiles $objdir/$n"
done
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
- test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- if test "$mode" = uninstall; then
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
cmds=$postuninstall_cmds
@@ -6187,7 +6658,8 @@
IFS="$save_ifs"
fi
# FIXME: should reinstall the best remaining shared library.
- fi
+ ;;
+ esac
fi
;;
@@ -6486,12 +6958,11 @@
# configuration. But we'll never go from static-only to shared-only.
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
+disable_libs=shared
# ### END LIBTOOL TAG CONFIG: disable-shared
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+disable_libs=static
# ### END LIBTOOL TAG CONFIG: disable-static
# Local Variables:
Modified: freeswitch/branches/stkn/conf/freeswitch.xml
==============================================================================
--- freeswitch/branches/stkn/conf/freeswitch.xml (original)
+++ freeswitch/branches/stkn/conf/freeswitch.xml Mon Jul 10 11:15:11 2006
@@ -1,13 +1,19 @@
<?xml version="1.0"?>
<document type="freeswitch/xml">
<section name="configuration" description="Various Configuration">
+ <configuration name="switch.conf" description="Modules">
+ <settings>
+ <!--Most channels to allow at once -->
+ <param name="max-sessions" value="1000"/>
+ </settings>
+ </configuration>
<configuration name="modules.conf" description="Modules">
<modules>
<!-- Loggers (I'd load these first) -->
<load module="mod_console"/>
<!-- <load module="mod_syslog"/> -->
- <!-- XML Interfaces -->
+ <!-- XML Interfaces -->
<!-- <load module="mod_xml_rpc"/> -->
<!-- Event Handlers -->
@@ -59,6 +65,10 @@
<!-- ASR /TTS -->
<!-- <load module="mod_cepstral"/> -->
<!-- <load module="mod_rss"/> -->
+
+ <!-- Conference Bridges -->
+ <!--<load module="mod_conference"/>-->
+
</modules>
</configuration>
@@ -107,12 +117,12 @@
<param name="dialplan" value="XML"/>
<param name="dtmf-duration" value="100"/>
<param name="codec-prefs" value="PCMU,PCMA"/>
- <!-- Payload number to bind DTMF to-->
+ <!-- Payload number to bind DTMF to-->
<param name="rfc2833-pt" value="101"/>
- <!-- disable to trade async for more calls -->
- <param name="use-rtp-timer" value="true"/>
- <!-- auto sense NAT issues and adjust accordingly -->
- <param name="use-rtp-auto-adjust" value="true"/>
+ <!-- disable to trade async for more calls -->
+ <param name="use-rtp-timer" value="true"/>
+ <!-- auto sense NAT issues and adjust accordingly -->
+ <param name="use-rtp-auto-adjust" value="true"/>
<!-- pick one (default if not specified is 'guess'); -->
<param name="rtp-ip" value="guess"/>
<!-- <param name-"rtp-ip" value="10.0.0.1"/> -->
@@ -228,8 +238,8 @@
<param name="message" value="Jingle all the way"/>
<param name="rtp-ip" value="10.0.0.1"/>
<param name="auto-login" value="true"/>
- <!-- disable to trade async for more calls -->
- <param name="use-rtp-timer" value="true"/>
+ <!-- disable to trade async for more calls -->
+ <param name="use-rtp-timer" value="true"/>
<!-- or -->
<!-- <param name="rtp-ip" value="my_lan_ip"/> -->
<!-- <param name="ext-rtp-ip" value="stun:stun.server.com"/> -->
@@ -243,16 +253,16 @@
</configuration>
<configuration name="xml_rpc.conf" description="XML RPC">
<settings>
- <!-- The port where you want to run the http service (default 8080) -->
- <param name="http-port" value="8080"/>
- <!-- if all 3 of the following params exist all http traffic will require auth -->
+ <!-- The port where you want to run the http service (default 8080) -->
+ <param name="http-port" value="8080"/>
+ <!-- if all 3 of the following params exist all http traffic will require auth -->
<param name="auth-realm" value="freeswitch"/>
<param name="auth-user" value="freeswitch"/>
<param name="auth-pass" value="works"/>
<!-- The url to a gateway cgi that can generate xml similar to
what's in this file only on-the-fly (leave it commented if you dont
need it) -->
- <!-- one or more |-delim of configuration|directory|dialplan -->
+ <!-- one or more |-delim of configuration|directory|dialplan -->
<!-- <param name="gateway-url" value="http://www.server.com/gateway.cgi" bindings="configuration"/> -->
</settings>
</configuration>
@@ -265,6 +275,61 @@
</feeds>
</configuration>
+ <!-- None of these paths are real if you want any of these options
+ you need to really set them up -->
+ <configuration name="conference.conf" description="Audio Conference">
+ <!-- Profiles are collections of settings you can reference by name. -->
+
+ <profiles>
+ <profile name="default">
+ <!-- Sample Rate-->
+ <param name="rate" value="8000"/>
+ <!-- Number of milliseconds per frame -->
+ <param name="interval" value="20"/>
+ <!-- Energy level required for audio to be sent to the other users -->
+ <param name="energy-level" value="300"/>
+ <!-- TTS Engine to use -->
+ <!--<param name="tts-engine" value="cepstral"/>-->
+ <!-- TTS Voice to use -->
+ <!--<param name="tts-voice" value="david"/>-->
+
+ <!-- If TTS is enabled all audio-file params not beginning with '/'
+ will be considered text to say with TTS -->
+
+ <!-- File to play to acknowledge succees -->
+ <!--<param name="ack-sound" value="/soundfiles/beep.wav"/>-->
+ <!-- File to play to acknowledge failure -->
+ <!--<param name="nack-sound" value="/soundfiles/beeperr.wav"/>-->
+ <!-- File to play to acknowledge muted -->
+ <!--<param name="muted-sound" value="/soundfiles/muted.wav"/>-->
+ <!-- File to play to acknowledge unmuted -->
+ <!--<param name="unmuted-sound" value="/soundfiles/unmuted.wav"/>-->
+ <!-- File to play if you are alone in the conference -->
+ <!--<param name="alone-sound" value="/soundfiles/yactopitc.wav"/>-->
+ <!-- File to play when you join the conference -->
+ <!--<param name="enter-sound" value="/soundfiles/welcome.wav"/>-->
+ <!-- File to play when you leave the conference -->
+ <!--<param name="exit-sound" value="/soundfiles/exit.wav"/>-->
+ <!-- File to play when you ae ejected from the conference -->
+ <!--<param name="kicked-sound" value="/soundfiles/kicked.wav"/>-->
+ <!-- File to play when the conference is locked -->
+ <!--<param name="locked-sound" value="/soundfiles/locked.wav"/>-->
+ <!-- File to play to prompt for a pin -->
+ <!--<param name="pin-sound" value="/soundfiles/pin.wav"/>-->
+ <!-- File to play to when the pin is invalid -->
+ <!--<param name="bad-pin-sound" value="/soundfiles/invalid-pin.wav"/>-->
+ <!-- Conference pin -->
+ <!--<param name="pin" value="12345"/>-->
+ <!-- Default Caller ID Name for outbound calls -->
+ <param name="caller-id-name" value="FreeSWITCH"/>
+ <!-- Default Caller ID Number for outbound calls -->
+ <param name="caller-id-number" value="8777423583"/>
+ </profile>
+ </profiles>
+ <rooms>
+ <room name="freeswitch" profile="default"/>
+ </rooms>
+ </configuration>
</section>
<section name="dialplan" description="Regex/XML Dialplan">
<!-- Valid fields in conditions:
@@ -274,18 +339,32 @@
<!-- *NOTE* The special context name 'any' will match any context -->
<context name="default">
- <extension name="tollfree">
- <condition field="destination_number" expression="^(18[0{2}8{2}7{2}6{2}]\d{7})">
- <action application="bridge" data="exosip/$1-freeswitch(a)voip.trxtel.com"/>
- </condition>
- </extension>
+ <extension name="tollfree">
+ <condition field="destination_number" expression="^(18[0{2}8{2}7{2}6{2}]\d{7})">
+ <action application="bridge" data="exosip/$1-freeswitch(a)voip.trxtel.com"/>
+ </condition>
+ </extension>
- <extension name="devconf">
- <condition field="destination_number" expression="^888$">
- <action application="bridge" data="exosip/888(a)66.250.68.194"/>
- </condition>
- </extension>
+ <extension name="devconf">
+ <condition field="destination_number" expression="^888$">
+ <action application="bridge" data="exosip/888(a)66.250.68.194"/>
+ </condition>
+ </extension>
+ <!-- Enter an existing conference -->
+ <extension name="1000">
+ <condition field="destination_number" expression="^1000$">
+ <action application="conference" data="freeswitch"/>
+ </condition>
+ </extension>
+
+ <!-- Start a dynamic conference and call someone at the same time -->
+ <extension name="2000">
+ <condition field="destination_number" expression="^2000$">
+ <action application="conference" data="bridge:mydynaconf:exosip/1234@66.250.68.194"/>
+ </condition>
+ </extension>
+
<!-- if the destination is an exact match on the extension name
you do not need any regex in the condition -->
<extension name="999">
@@ -294,30 +373,30 @@
<!-- extensions starting with 4, all the numbers after 4 form a numeric filename
continue=true means keep looking for more extensions to match
*NOTE* The entire dialplan is parsed ONCE when the call starts
- so any call info acquired after the various actions cannot
- be taken into consideration.
+ so any call info acquired after the various actions cannot
+ be taken into consideration.
- The first match will play a beep and the second one plays
- the desired file. This is for demo purposes both actions
- could have been under the same <extension> tag as well.
- -->
+ The first match will play a beep and the second one plays
+ the desired file. This is for demo purposes both actions
+ could have been under the same <extension> tag as well.
+ -->
<extension name="playsound1" continue="true">
<condition field="source" expression="mod_exosip"/>
<condition field="destination_number" expression="^4(\d+)">
<action application="playback" data="/var/sounds/beep.gsm"/>
- </condition>
+ </condition>
</extension>
<extension name="playsound2">
<condition field="source" expression="mod_exosip"/>
<condition field="destination_number" expression="^4(\d+)">
<action application="playback" data="/root/$1.raw"/>
- </condition>
+ </condition>
</extension>
<!-- send everything with a certian RDNIS to Wanpipe ISDN -->
<extension name="To PRI">
<condition field="rdnis" expression="8881231234"/>
<condition field="destination_number" expression="(.*)">
- <action application="bridge" data="wanpipe/a/a/$1"/>
+ <action application="bridge" data="wanpipe/a/a/$1"/>
</condition>
</extension>
<!-- Call *MUST* originate from mod_iax and also be dialing ext 9999-->
Modified: freeswitch/branches/stkn/modules.conf.in
==============================================================================
--- freeswitch/branches/stkn/modules.conf.in (original)
+++ freeswitch/branches/stkn/modules.conf.in Mon Jul 10 11:15:11 2006
@@ -1,6 +1,7 @@
loggers/mod_console
loggers/mod_syslog
applications/mod_commands
+applications/mod_conference
applications/mod_bridgecall
applications/mod_echo
applications/mod_ivrtest
@@ -17,8 +18,7 @@
#dialplans/mod_dialplan_directory
dialplans/mod_dialplan_xml
#directories/mod_ldap
-#endpoints/mod_exosip
-endpoints/mod_pjsip
+endpoints/mod_exosip
endpoints/mod_iax
endpoints/mod_dingaling
endpoints/mod_portaudio
Modified: freeswitch/branches/stkn/src/include/switch_core.h
==============================================================================
--- freeswitch/branches/stkn/src/include/switch_core.h (original)
+++ freeswitch/branches/stkn/src/include/switch_core.h Mon Jul 10 11:15:11 2006
@@ -117,6 +117,13 @@
SWITCH_DECLARE(switch_status_t) switch_core_init(char *console, const char **err);
/*!
+ \brief Set/Get Session Limit
+ \param new new value (if > 0)
+ \return the current session limit
+*/
+SWITCH_DECLARE(uint32_t) switch_core_session_limit(uint32_t new);
+
+/*!
\brief Destroy the core
\note to be called at application shutdown
*/
@@ -308,6 +315,11 @@
\note if the session was located it will have a read lock obtained which will need to be released with switch_core_session_rwunlock()
*/
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_locate(char *uuid_str);
+
+/*!
+ \brief Hangup All Sessions
+*/
+SWITCH_DECLARE(void) switch_core_session_hupall(void);
/*!
\brief Send a message to another session using it's uuid
Modified: freeswitch/branches/stkn/src/include/switch_types.h
==============================================================================
--- freeswitch/branches/stkn/src/include/switch_types.h (original)
+++ freeswitch/branches/stkn/src/include/switch_types.h Mon Jul 10 11:15:11 2006
@@ -619,7 +619,8 @@
SWITCH_CAUSE_MANDATORY_IE_LENGTH_ERROR = 103,
SWITCH_CAUSE_PROTOCOL_ERROR = 111,
SWITCH_CAUSE_INTERWORKING = 127,
- SWITCH_CAUSE_CRASH = 500
+ SWITCH_CAUSE_CRASH = 500,
+ SWITCH_CAUSE_SYSTEM_SHUTDOWN = 501
} switch_call_cause_t;
Modified: freeswitch/branches/stkn/src/mod/applications/mod_rss/mod_rss.c
==============================================================================
--- freeswitch/branches/stkn/src/mod/applications/mod_rss/mod_rss.c (original)
+++ freeswitch/branches/stkn/src/mod/applications/mod_rss/mod_rss.c Mon Jul 10 11:15:11 2006
@@ -602,15 +602,17 @@
cont = 0;
continue;
}
-
- status = switch_ivr_speak_text_handle(session,
- &sh,
- &speech_codec,
- timerp,
- on_dtmf,
- entries[dtb.index].description_txt,
- &dtb,
- sizeof(dtb));
+
+ if (entries[dtb.index].description_txt) {
+ status = switch_ivr_speak_text_handle(session,
+ &sh,
+ &speech_codec,
+ timerp,
+ on_dtmf,
+ entries[dtb.index].description_txt,
+ &dtb,
+ sizeof(dtb));
+ }
if (status == SWITCH_STATUS_BREAK) {
continue;
} else if (status != SWITCH_STATUS_SUCCESS) {
Modified: freeswitch/branches/stkn/src/switch.c
==============================================================================
--- freeswitch/branches/stkn/src/switch.c (original)
+++ freeswitch/branches/stkn/src/switch.c Mon Jul 10 11:15:11 2006
@@ -188,7 +188,7 @@
#define __CP "DISABLED"
#endif
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "freeswitch Version %s Started. Crash Protection [%s]\n\n", SWITCH_VERSION_FULL, __CP);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "freeswitch Version %s Started. Crash Protection [%s] Max Sessions[%u]\n\n", SWITCH_VERSION_FULL, __CP, switch_core_session_limit(0));
snprintf(path, sizeof(path), "%s%s%s", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR, pfile);
if (bg) {
@@ -217,6 +217,8 @@
switch_event_fire(&event);
}
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "End existing sessions\n");
+ switch_core_session_hupall();
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Clean up modules.\n");
switch_loadable_module_shutdown();
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Tearing down environment.\n");
Modified: freeswitch/branches/stkn/src/switch_channel.c
==============================================================================
--- freeswitch/branches/stkn/src/switch_channel.c (original)
+++ freeswitch/branches/stkn/src/switch_channel.c Mon Jul 10 11:15:11 2006
@@ -83,6 +83,7 @@
{ "PROTOCOL_ERROR", SWITCH_CAUSE_PROTOCOL_ERROR },
{ "INTERWORKING", SWITCH_CAUSE_INTERWORKING },
{ "CRASH", SWITCH_CAUSE_CRASH },
+ { "SYSTEM_SHUTDOWN", SWITCH_CAUSE_SYSTEM_SHUTDOWN },
{ NULL, 0 }
};
Modified: freeswitch/branches/stkn/src/switch_core.c
==============================================================================
--- freeswitch/branches/stkn/src/switch_core.c (original)
+++ freeswitch/branches/stkn/src/switch_core.c Mon Jul 10 11:15:11 2006
@@ -85,6 +85,7 @@
uint32_t session_id;
apr_pool_t *memory_pool;
switch_hash_t *session_table;
+ switch_mutex_t *session_table_mutex;
#ifdef CRASH_PROT
switch_hash_t *stack_table;
#endif
@@ -93,6 +94,8 @@
const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS];
int state_handler_index;
FILE *console;
+ uint32_t session_count;
+ uint32_t session_limit;
switch_queue_t *sql_queue;
};
@@ -246,6 +249,8 @@
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_locate(char *uuid_str)
{
switch_core_session_t *session;
+
+ switch_mutex_lock(runtime.session_table_mutex);
if ((session = switch_core_hash_find(runtime.session_table, uuid_str))) {
/* Acquire a read lock on the session */
if (switch_thread_rwlock_tryrdlock(session->rwlock) != SWITCH_STATUS_SUCCESS) {
@@ -253,16 +258,41 @@
session = NULL;
}
}
+ switch_mutex_unlock(runtime.session_table_mutex);
/* if its not NULL, now it's up to you to rwunlock this */
return session;
}
+SWITCH_DECLARE(void) switch_core_session_hupall(void)
+{
+ switch_hash_index_t *hi;
+ void *val;
+ switch_core_session_t *session;
+ switch_channel_t *channel;
+
+ switch_mutex_lock(runtime.session_table_mutex);
+ for (hi = switch_hash_first(runtime.memory_pool, runtime.session_table); hi; hi = switch_hash_next(hi)) {
+ switch_hash_this(hi, NULL, NULL, &val);
+ if (val) {
+ session = (switch_core_session_t *) val;
+ channel = switch_core_session_get_channel(session);
+ switch_channel_hangup(channel, SWITCH_CAUSE_SYSTEM_SHUTDOWN);
+ }
+ }
+ switch_mutex_unlock(runtime.session_table_mutex);
+
+ while(runtime.session_count) {
+ switch_yield(1000);
+ }
+}
+
SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(char *uuid_str, switch_core_session_message_t *message)
{
switch_core_session_t *session = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
+ switch_mutex_lock(runtime.session_table_mutex);
if ((session = switch_core_hash_find(runtime.session_table, uuid_str)) != 0) {
/* Acquire a read lock on the session or forget it the channel is dead */
if (switch_thread_rwlock_tryrdlock(session->rwlock) == SWITCH_STATUS_SUCCESS) {
@@ -272,6 +302,7 @@
switch_thread_rwlock_unlock(session->rwlock);
}
}
+ switch_mutex_unlock(runtime.session_table_mutex);
return status;
}
@@ -281,6 +312,7 @@
switch_core_session_t *session = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
+ switch_mutex_lock(runtime.session_table_mutex);
if ((session = switch_core_hash_find(runtime.session_table, uuid_str)) != 0) {
/* Acquire a read lock on the session or forget it the channel is dead */
if (switch_thread_rwlock_tryrdlock(session->rwlock) == SWITCH_STATUS_SUCCESS) {
@@ -290,6 +322,7 @@
switch_thread_rwlock_unlock(session->rwlock);
}
}
+ switch_mutex_unlock(runtime.session_table_mutex);
return status;
}
@@ -2344,6 +2377,9 @@
apr_pool_destroy(pool);
pool = NULL;
+ switch_mutex_lock(runtime.session_table_mutex);
+ runtime.session_count--;
+ switch_mutex_unlock(runtime.session_table_mutex);
}
SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t **hash, switch_memory_pool_t *pool)
@@ -2434,18 +2470,21 @@
{
switch_core_session_t *session = obj;
session->thread = thread;
- session->id = runtime.session_id++;
-
snprintf(session->name, sizeof(session->name), "%u", session->id);
-
+ switch_mutex_lock(runtime.session_table_mutex);
+ session->id = runtime.session_id++;
switch_core_hash_insert(runtime.session_table, session->uuid_str, session);
+ switch_mutex_unlock(runtime.session_table_mutex);
+
switch_core_session_run(session);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Session %u (%s) Locked, Waiting on external entities\n", session->id, switch_channel_get_name(session->channel));
switch_core_session_write_lock(session);
switch_core_session_rwunlock(session);
+ switch_mutex_lock(runtime.session_table_mutex);
switch_core_hash_delete(runtime.session_table, session->uuid_str);
+ switch_mutex_unlock(runtime.session_table_mutex);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Session %u (%s) Ended\n", session->id, switch_channel_get_name(session->channel));
switch_core_session_destroy(&session);
return NULL;
@@ -2503,9 +2542,19 @@
switch_memory_pool_t *usepool;
switch_core_session_t *session;
switch_uuid_t uuid;
+ uint32_t count = 0;
assert(endpoint_interface != NULL);
+ switch_mutex_lock(runtime.session_table_mutex);
+ count = runtime.session_count;
+ switch_mutex_unlock(runtime.session_table_mutex);
+
+ if ((count + 1) > runtime.session_limit) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Over Session Limit!\n");
+ return NULL;
+ }
+
if (pool) {
usepool = pool;
} else if (switch_core_new_memory_pool(&usepool) != SWITCH_STATUS_SUCCESS) {
@@ -2551,6 +2600,9 @@
switch_thread_cond_create(&session->cond, session->pool);
switch_thread_rwlock_create(&session->rwlock, session->pool);
+ switch_mutex_lock(runtime.session_table_mutex);
+ runtime.session_count++;
+ switch_mutex_unlock(runtime.session_table_mutex);
return session;
}
@@ -2806,10 +2858,22 @@
#endif
}
+
+SWITCH_DECLARE(uint32_t) switch_core_session_limit(uint32_t new)
+{
+ if (new) {
+ runtime.session_limit = new;
+ }
+
+ return runtime.session_limit;
+}
+
SWITCH_DECLARE(switch_status_t) switch_core_init(char *console, const char **err)
{
memset(&runtime, 0, sizeof(runtime));
-
+ runtime.session_limit = 1000;
+ switch_xml_t xml = NULL, cfg = NULL;
+
switch_core_set_globals();
/* INIT APR and Create the pool context */
@@ -2830,6 +2894,23 @@
return SWITCH_STATUS_MEMERR;
}
+
+ if ((xml = switch_xml_open_cfg("switch.conf", &cfg, NULL))) {
+ switch_xml_t settings, param;
+
+ if ((settings = switch_xml_child(cfg, "settings"))) {
+ for (param = switch_xml_child(settings, "param"); param; param = param->next) {
+ char *var = (char *) switch_xml_attr_soft(param, "name");
+ char *val = (char *) switch_xml_attr_soft(param, "value");
+
+ if (!strcasecmp(var, "max-sessions")) {
+ runtime.session_limit = atoi(val);
+ }
+ }
+ }
+ switch_xml_free(xml);
+ }
+
*err = NULL;
if(console) {
@@ -2909,6 +2990,7 @@
runtime.session_id = 1;
switch_core_hash_init(&runtime.session_table, runtime.memory_pool);
+ switch_mutex_init(&runtime.session_table_mutex, SWITCH_MUTEX_NESTED, runtime.memory_pool);
#ifdef CRASH_PROT
switch_core_hash_init(&runtime.stack_table, runtime.memory_pool);
#endif
Modified: freeswitch/branches/stkn/w32/vsnet/Freeswitch.sln
==============================================================================
--- freeswitch/branches/stkn/w32/vsnet/Freeswitch.sln (original)
+++ freeswitch/branches/stkn/w32/vsnet/Freeswitch.sln Mon Jul 10 11:15:11 2006
@@ -208,6 +208,11 @@
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_conference", "..\..\src\mod\applications\mod_conference\mod_conference.vcproj", "{C24FB505-05D7-4319-8485-7540B44C8603}"
+ ProjectSection(ProjectDependencies) = postProject
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -354,6 +359,10 @@
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Debug|Win32.Build.0 = Debug|Win32
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Release|Win32.ActiveCfg = Release|Win32
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Release|Win32.Build.0 = Release|Win32
+ {C24FB505-05D7-4319-8485-7540B44C8603}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C24FB505-05D7-4319-8485-7540B44C8603}.Debug|Win32.Build.0 = Debug|Win32
+ {C24FB505-05D7-4319-8485-7540B44C8603}.Release|Win32.ActiveCfg = Release|Win32
+ {C24FB505-05D7-4319-8485-7540B44C8603}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -376,6 +385,7 @@
{0E2C6395-13B9-46E5-9264-8859D346018D} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
+ {C24FB505-05D7-4319-8485-7540B44C8603} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{3A5B9131-F20C-4A85-9447-6C1610941CEE} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{5FD31A25-5D83-4794-8BEE-904DAD84CE71} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{FE3540C5-3303-46E0-A69E-D92F775687F1} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
1
0
Author: sphere
Date: Mon Jul 10 04:44:42 2006
New Revision: 1809
Added:
freeswitch/branches/max/
Log:
Creating empty folder for max
1
0
Author: sphere
Date: Mon Jul 10 03:52:57 2006
New Revision: 1808
Added:
freeswitch/branches/cn168000/
Log:
Creating empty folder for cn168000
1
0
Author: sphere
Date: Mon Jul 10 02:44:47 2006
New Revision: 1807
Added:
freeswitch/branches/jstocks/
Log:
Creating empty folder for jstocks
1
0
10 Jul '06
Author: stkn
Date: Mon Jul 10 01:13:37 2006
New Revision: 1806
Modified:
freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/Makefile
Log:
call pjsdp configure in a subshell (a little less ugly than cd foo; bar; cd ..)
Modified: freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/Makefile
==============================================================================
--- freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/Makefile (original)
+++ freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/Makefile Mon Jul 10 01:13:37 2006
@@ -39,7 +39,7 @@
depends:
MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) $(PJ_PROJECT).tar.gz --prefix=$(PREFIX)
- cd pjsdp; ./configure; cd $(srcdir)
+ (cd pjsdp; ./configure)
%.o: %.c
$(CC) -fPIC $(CFLAGS) -c -o $@ $<
1
0
[commit] r1805 - in freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip: . pjsdp
by Freeswitch SVN 10 Jul '06
by Freeswitch SVN 10 Jul '06
10 Jul '06
Author: stkn
Date: Mon Jul 10 01:10:24 2006
New Revision: 1805
Removed:
freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/pjsdp/build.mak
Modified:
freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/Makefile
freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/pjsdp/configure
Log:
Fix mod_pjsip makefile to call pjsdp configure and fix pjsdp configure to support ppc
Modified: freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/Makefile
==============================================================================
--- freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/Makefile (original)
+++ freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/Makefile Mon Jul 10 01:10:24 2006
@@ -39,6 +39,7 @@
depends:
MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) $(PJ_PROJECT).tar.gz --prefix=$(PREFIX)
+ cd pjsdp; ./configure; cd $(srcdir)
%.o: %.c
$(CC) -fPIC $(CFLAGS) -c -o $@ $<
Modified: freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/pjsdp/configure
==============================================================================
--- freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/pjsdp/configure (original)
+++ freeswitch/branches/stkn/src/mod/endpoints/mod_pjsip/pjsdp/configure Mon Jul 10 01:10:24 2006
@@ -13,7 +13,7 @@
MACHINE_NAME=i386
elif echo $MACHINE | grep alpha > /dev/null; then
MACHINE_NAME=alpha
-elif echo $MACHINE | grep Mac > /dev/null; then
+elif echo $MACHINE | grep "Mac\|ppc\|powerpc" > /dev/null; then
MACHINE_NAME=powerpc
else
echo "Unable to detect processor type ('uname -m' == '$MACHINE')"
1
0