[Freeswitch-svn] [commit] r2407 - in freeswitch/branches/mishehu: . build conf libs libs/codec/gsm libs/codec/ilbc libs/iax libs/libdingaling libs/libdingaling/src libs/libteletone libs/srtp libs/win32 libs/win32/apr libs/win32/apr-iconv libs/win32/apr-util libs/win32/curl libs/win32/exosip libs/win32/howl libs/win32/iksemel libs/win32/js libs/win32/libresample libs/win32/libsndfile libs/win32/pcre libs/win32/portaudio libs/win32/speex libs/win32/sqlite libs/win32/xmlrpc mac/xcode/FreeSWITCH.xcodeproj src src/include src/mod/applications/mod_bridgecall src/mod/applications/mod_commands src/mod/applications/mod_conference src/mod/applications/mod_dptools src/mod/applications/mod_echo src/mod/applications/mod_ivrtest src/mod/applications/mod_playback src/mod/applications/mod_rss src/mod/asr_tts/mod_cepstral src/mod/codecs/mod_g711 src/mod/codecs/mod_g726 src/mod/codecs/mod_g729 src/mod/codecs/mod_gsm src/mod/codecs/mod_ilbc src/mod/codecs/mod_l16 src/mod/codecs/mod_speex src/mod/dialplans/mod_dialplan_directory src/mod/dialplans/mod_dialplan_xml src/mod/directories/mod_ldap src/mod/endpoints/mod_dingaling src/mod/endpoints/mod_exosip src/mod/endpoints/mod_iax src/mod/endpoints/mod_portaudio src/mod/endpoints/mod_sofia src/mod/endpoints/mod_woomera src/mod/event_handlers/mod_cdr src/mod/event_handlers/mod_event_multicast src/mod/event_handlers/mod_event_socket src/mod/event_handlers/mod_event_test src/mod/event_handlers/mod_xmpp_event src/mod/event_handlers/mod_zeroconf src/mod/formats/mod_sndfile src/mod/languages/mod_perl src/mod/languages/mod_spidermonkey src/mod/loggers/mod_console src/mod/loggers/mod_syslog src/mod/timers/mod_softtimer src/mod/xml_int/mod_xml_rpc support w32/Setup w32/vsnet w32/vsnet/Tools w32/vsnet/Tools/PortAudio w32/vsnet/Tools/apr w32/vsnet/Tools/curl w32/vsnet/Tools/gnutls w32/vsnet/Tools/howl w32/vsnet/Tools/iksemel w32/vsnet/Tools/libsndfile w32/vsnet/Tools/openldap w32/vsnet/Tools/pcre w32/vsnet/Tools/xmlrpc

Freeswitch SVN mishehu at freeswitch.org
Sun Aug 27 11:43:24 EDT 2006


Author: mishehu
Date: Sun Aug 27 11:43:21 2006
New Revision: 2407

Added:
   freeswitch/branches/mishehu/Freeswitch.sln
      - copied unchanged from r2406, /freeswitch/trunk/Freeswitch.sln
   freeswitch/branches/mishehu/libs/srtp/libsrtp.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/srtp/libsrtp.vcproj
   freeswitch/branches/mishehu/libs/win32/
      - copied from r2406, /freeswitch/trunk/libs/win32/
   freeswitch/branches/mishehu/libs/win32/Download APR-Iconv.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download APR-Iconv.vcproj
   freeswitch/branches/mishehu/libs/win32/Download APR-Util.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download APR-Util.vcproj
   freeswitch/branches/mishehu/libs/win32/Download APR.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download APR.vcproj
   freeswitch/branches/mishehu/libs/win32/Download CURL.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download CURL.vcproj
   freeswitch/branches/mishehu/libs/win32/Download EXOSIP.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download EXOSIP.vcproj
   freeswitch/branches/mishehu/libs/win32/Download HOWL.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download HOWL.vcproj
   freeswitch/branches/mishehu/libs/win32/Download IKSEMEL.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download IKSEMEL.vcproj
   freeswitch/branches/mishehu/libs/win32/Download LIBRESAMPLE.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download LIBRESAMPLE.vcproj
   freeswitch/branches/mishehu/libs/win32/Download LIBSNDFILE.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download LIBSNDFILE.vcproj
   freeswitch/branches/mishehu/libs/win32/Download PCRE.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download PCRE.vcproj
   freeswitch/branches/mishehu/libs/win32/Download PORTAUDIO.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download PORTAUDIO.vcproj
   freeswitch/branches/mishehu/libs/win32/Download SPEEX.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download SPEEX.vcproj
   freeswitch/branches/mishehu/libs/win32/Download SPIDERMONKEY.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download SPIDERMONKEY.vcproj
   freeswitch/branches/mishehu/libs/win32/Download SQLITE.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download SQLITE.vcproj
   freeswitch/branches/mishehu/libs/win32/Download XMLRPC.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/Download XMLRPC.vcproj
   freeswitch/branches/mishehu/libs/win32/apr/
      - copied from r2406, /freeswitch/trunk/libs/win32/apr/
   freeswitch/branches/mishehu/libs/win32/apr-iconv/
      - copied from r2406, /freeswitch/trunk/libs/win32/apr-iconv/
   freeswitch/branches/mishehu/libs/win32/apr-iconv/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/apr-iconv/cleancount
   freeswitch/branches/mishehu/libs/win32/apr-iconv/libapriconv.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/apr-iconv/libapriconv.vcproj
   freeswitch/branches/mishehu/libs/win32/apr-util/
      - copied from r2406, /freeswitch/trunk/libs/win32/apr-util/
   freeswitch/branches/mishehu/libs/win32/apr-util/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/apr-util/cleancount
   freeswitch/branches/mishehu/libs/win32/apr-util/libaprutil.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/apr-util/libaprutil.vcproj
   freeswitch/branches/mishehu/libs/win32/apr-util/xml.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/apr-util/xml.vcproj
   freeswitch/branches/mishehu/libs/win32/apr/apr.hw
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/apr/apr.hw
   freeswitch/branches/mishehu/libs/win32/apr/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/apr/cleancount
   freeswitch/branches/mishehu/libs/win32/apr/libapr.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/apr/libapr.vcproj
   freeswitch/branches/mishehu/libs/win32/curl/
      - copied from r2406, /freeswitch/trunk/libs/win32/curl/
   freeswitch/branches/mishehu/libs/win32/curl/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/curl/cleancount
   freeswitch/branches/mishehu/libs/win32/curl/curllib.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/curl/curllib.vcproj
   freeswitch/branches/mishehu/libs/win32/exosip/
      - copied from r2406, /freeswitch/trunk/libs/win32/exosip/
   freeswitch/branches/mishehu/libs/win32/exosip/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/exosip/cleancount
   freeswitch/branches/mishehu/libs/win32/exosip/eXosip.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/exosip/eXosip.vcproj
   freeswitch/branches/mishehu/libs/win32/exosip/osip2.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/exosip/osip2.vcproj
   freeswitch/branches/mishehu/libs/win32/exosip/osipparser2.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/exosip/osipparser2.vcproj
   freeswitch/branches/mishehu/libs/win32/howl/
      - copied from r2406, /freeswitch/trunk/libs/win32/howl/
   freeswitch/branches/mishehu/libs/win32/howl/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/howl/cleancount
   freeswitch/branches/mishehu/libs/win32/howl/libhowl.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/howl/libhowl.vcproj
   freeswitch/branches/mishehu/libs/win32/howl/libmDNSResponder.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/howl/libmDNSResponder.vcproj
   freeswitch/branches/mishehu/libs/win32/iksemel/
      - copied from r2406, /freeswitch/trunk/libs/win32/iksemel/
   freeswitch/branches/mishehu/libs/win32/iksemel/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/iksemel/cleancount
   freeswitch/branches/mishehu/libs/win32/iksemel/config.h
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/iksemel/config.h
   freeswitch/branches/mishehu/libs/win32/iksemel/iksemel.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/iksemel/iksemel.vcproj
   freeswitch/branches/mishehu/libs/win32/js/
      - copied from r2406, /freeswitch/trunk/libs/win32/js/
   freeswitch/branches/mishehu/libs/win32/js/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/js/cleancount
   freeswitch/branches/mishehu/libs/win32/js/fdlibm.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/js/fdlibm.vcproj
   freeswitch/branches/mishehu/libs/win32/js/js.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/js/js.vcproj
   freeswitch/branches/mishehu/libs/win32/libresample/
      - copied from r2406, /freeswitch/trunk/libs/win32/libresample/
   freeswitch/branches/mishehu/libs/win32/libresample/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/libresample/cleancount
   freeswitch/branches/mishehu/libs/win32/libresample/libresample.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/libresample/libresample.vcproj
   freeswitch/branches/mishehu/libs/win32/libsndfile/
      - copied from r2406, /freeswitch/trunk/libs/win32/libsndfile/
   freeswitch/branches/mishehu/libs/win32/libsndfile/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/libsndfile/cleancount
   freeswitch/branches/mishehu/libs/win32/libsndfile/common.c
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/libsndfile/common.c
   freeswitch/branches/mishehu/libs/win32/libsndfile/config.h
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/libsndfile/config.h
   freeswitch/branches/mishehu/libs/win32/libsndfile/libsndfile.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/libsndfile/libsndfile.vcproj
   freeswitch/branches/mishehu/libs/win32/libsndfile/sndfile.h
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/libsndfile/sndfile.h
   freeswitch/branches/mishehu/libs/win32/pcre/
      - copied from r2406, /freeswitch/trunk/libs/win32/pcre/
   freeswitch/branches/mishehu/libs/win32/pcre/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/pcre/cleancount
   freeswitch/branches/mishehu/libs/win32/pcre/config.h
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/pcre/config.h
   freeswitch/branches/mishehu/libs/win32/pcre/dftables.c
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/pcre/dftables.c
   freeswitch/branches/mishehu/libs/win32/pcre/libpcre.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/pcre/libpcre.vcproj
   freeswitch/branches/mishehu/libs/win32/pcre/pcre.h
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/pcre/pcre.h
   freeswitch/branches/mishehu/libs/win32/pcre/pcre_chartables.c.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/pcre/pcre_chartables.c.vcproj
   freeswitch/branches/mishehu/libs/win32/portaudio/
      - copied from r2406, /freeswitch/trunk/libs/win32/portaudio/
   freeswitch/branches/mishehu/libs/win32/portaudio/PAStaticWMME.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/portaudio/PAStaticWMME.vcproj
   freeswitch/branches/mishehu/libs/win32/portaudio/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/portaudio/cleancount
   freeswitch/branches/mishehu/libs/win32/speex/
      - copied from r2406, /freeswitch/trunk/libs/win32/speex/
   freeswitch/branches/mishehu/libs/win32/speex/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/speex/cleancount
   freeswitch/branches/mishehu/libs/win32/speex/libspeex.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/speex/libspeex.vcproj
   freeswitch/branches/mishehu/libs/win32/sqlite/
      - copied from r2406, /freeswitch/trunk/libs/win32/sqlite/
   freeswitch/branches/mishehu/libs/win32/sqlite/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/sqlite/cleancount
   freeswitch/branches/mishehu/libs/win32/sqlite/sqlite.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/sqlite/sqlite.vcproj
   freeswitch/branches/mishehu/libs/win32/util.vbs
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/util.vbs
   freeswitch/branches/mishehu/libs/win32/xmlrpc/
      - copied from r2406, /freeswitch/trunk/libs/win32/xmlrpc/
   freeswitch/branches/mishehu/libs/win32/xmlrpc/Abyss.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/xmlrpc/Abyss.vcproj
   freeswitch/branches/mishehu/libs/win32/xmlrpc/cleancount
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/xmlrpc/cleancount
   freeswitch/branches/mishehu/libs/win32/xmlrpc/xmlrpc.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/libs/win32/xmlrpc/xmlrpc.vcproj
   freeswitch/branches/mishehu/src/mod/codecs/mod_g726/
      - copied from r2406, /freeswitch/trunk/src/mod/codecs/mod_g726/
   freeswitch/branches/mishehu/src/mod/codecs/mod_g726/Makefile
      - copied unchanged from r2406, /freeswitch/trunk/src/mod/codecs/mod_g726/Makefile
   freeswitch/branches/mishehu/src/mod/codecs/mod_g726/mod_g726.c
      - copied unchanged from r2406, /freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c
   freeswitch/branches/mishehu/src/mod/endpoints/mod_sofia/
      - copied from r2406, /freeswitch/trunk/src/mod/endpoints/mod_sofia/
   freeswitch/branches/mishehu/src/mod/endpoints/mod_sofia/Makefile
      - copied unchanged from r2406, /freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile
   freeswitch/branches/mishehu/src/mod/endpoints/mod_sofia/mod_sofia.c
      - copied unchanged from r2406, /freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
   freeswitch/branches/mishehu/src/mod/endpoints/mod_sofia/mod_sofia.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj
   freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/sqlitecdr.cpp
   freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/sqlitecdr.h
   freeswitch/branches/mishehu/src/mod/formats/mod_sndfile/mod_sndfile.vcproj
      - copied unchanged from r2406, /freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.vcproj
   freeswitch/branches/mishehu/support/
      - copied from r2406, /freeswitch/trunk/support/
   freeswitch/branches/mishehu/support/freeswitch.pub
      - copied unchanged from r2406, /freeswitch/trunk/support/freeswitch.pub
Removed:
   freeswitch/branches/mishehu/src/mod/formats/mod_sndfile/mod_sndfilel.vcproj
   freeswitch/branches/mishehu/w32/vsnet/Tools/PortAudio/
   freeswitch/branches/mishehu/w32/vsnet/Tools/apr/
   freeswitch/branches/mishehu/w32/vsnet/Tools/curl/
   freeswitch/branches/mishehu/w32/vsnet/Tools/gnutls/
   freeswitch/branches/mishehu/w32/vsnet/Tools/howl/
   freeswitch/branches/mishehu/w32/vsnet/Tools/iksemel/
   freeswitch/branches/mishehu/w32/vsnet/Tools/libetpan.vcproj
   freeswitch/branches/mishehu/w32/vsnet/Tools/libsndfile/
   freeswitch/branches/mishehu/w32/vsnet/Tools/libsndfile.vcproj
   freeswitch/branches/mishehu/w32/vsnet/Tools/libspeex.vcproj
   freeswitch/branches/mishehu/w32/vsnet/Tools/openldap/
   freeswitch/branches/mishehu/w32/vsnet/Tools/pcre/
   freeswitch/branches/mishehu/w32/vsnet/Tools/sqlite.vcproj
   freeswitch/branches/mishehu/w32/vsnet/Tools/xmlrpc/
Modified:
   freeswitch/branches/mishehu/AUTHORS
   freeswitch/branches/mishehu/Makefile.am
   freeswitch/branches/mishehu/Makefile.in
   freeswitch/branches/mishehu/aclocal.m4
   freeswitch/branches/mishehu/build/buildlib.sh
   freeswitch/branches/mishehu/build/modmake.sh
   freeswitch/branches/mishehu/conf/freeswitch.xml
   freeswitch/branches/mishehu/configure
   freeswitch/branches/mishehu/libs/codec/gsm/libgsm.vcproj
   freeswitch/branches/mishehu/libs/codec/ilbc/libilbc.vcproj
   freeswitch/branches/mishehu/libs/iax/libiax2.vcproj
   freeswitch/branches/mishehu/libs/libdingaling/libdingaling.vcproj
   freeswitch/branches/mishehu/libs/libdingaling/src/dingaling.def
   freeswitch/branches/mishehu/libs/libdingaling/src/libdingaling.c
   freeswitch/branches/mishehu/libs/libdingaling/src/libdingaling.h
   freeswitch/branches/mishehu/libs/libteletone/libteletone.vcproj
   freeswitch/branches/mishehu/libs/mozilla.build.sh
   freeswitch/branches/mishehu/libs/srtp.build.sh
   freeswitch/branches/mishehu/mac/xcode/FreeSWITCH.xcodeproj/project.pbxproj
   freeswitch/branches/mishehu/src/include/switch_core.h
   freeswitch/branches/mishehu/src/include/switch_event.h
   freeswitch/branches/mishehu/src/include/switch_ivr.h
   freeswitch/branches/mishehu/src/include/switch_platform.h
   freeswitch/branches/mishehu/src/include/switch_types.h
   freeswitch/branches/mishehu/src/mod/applications/mod_bridgecall/mod_bridgecall.c
   freeswitch/branches/mishehu/src/mod/applications/mod_bridgecall/mod_bridgecall.vcproj
   freeswitch/branches/mishehu/src/mod/applications/mod_commands/mod_commands.c
   freeswitch/branches/mishehu/src/mod/applications/mod_commands/mod_commands.vcproj
   freeswitch/branches/mishehu/src/mod/applications/mod_conference/mod_conference.c
   freeswitch/branches/mishehu/src/mod/applications/mod_conference/mod_conference.vcproj
   freeswitch/branches/mishehu/src/mod/applications/mod_dptools/mod_dptools.c
   freeswitch/branches/mishehu/src/mod/applications/mod_dptools/mod_dptools.vcproj
   freeswitch/branches/mishehu/src/mod/applications/mod_echo/mod_echo.c
   freeswitch/branches/mishehu/src/mod/applications/mod_echo/mod_echo.vcproj
   freeswitch/branches/mishehu/src/mod/applications/mod_ivrtest/mod_ivrtest.vcproj
   freeswitch/branches/mishehu/src/mod/applications/mod_playback/mod_playback.c
   freeswitch/branches/mishehu/src/mod/applications/mod_playback/mod_playback.vcproj
   freeswitch/branches/mishehu/src/mod/applications/mod_rss/mod_rss.vcproj
   freeswitch/branches/mishehu/src/mod/asr_tts/mod_cepstral/mod_cepstral.vcproj
   freeswitch/branches/mishehu/src/mod/codecs/mod_g711/mod_g711.c
   freeswitch/branches/mishehu/src/mod/codecs/mod_g711/mod_g711.vcproj
   freeswitch/branches/mishehu/src/mod/codecs/mod_g729/mod_g729.c
   freeswitch/branches/mishehu/src/mod/codecs/mod_g729/mod_g729.vcproj
   freeswitch/branches/mishehu/src/mod/codecs/mod_gsm/mod_gsm.c
   freeswitch/branches/mishehu/src/mod/codecs/mod_gsm/mod_gsm.vcproj
   freeswitch/branches/mishehu/src/mod/codecs/mod_ilbc/mod_ilbc.vcproj
   freeswitch/branches/mishehu/src/mod/codecs/mod_l16/mod_l16.vcproj
   freeswitch/branches/mishehu/src/mod/codecs/mod_speex/Makefile
   freeswitch/branches/mishehu/src/mod/codecs/mod_speex/mod_speex.c
   freeswitch/branches/mishehu/src/mod/codecs/mod_speex/mod_speex.vcproj
   freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.vcproj
   freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.vcproj
   freeswitch/branches/mishehu/src/mod/directories/mod_ldap/mod_ldap.vcproj
   freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.c
   freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.vcproj
   freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.c
   freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.vcproj
   freeswitch/branches/mishehu/src/mod/endpoints/mod_iax/mod_iax.c
   freeswitch/branches/mishehu/src/mod/endpoints/mod_iax/mod_iax.vcproj
   freeswitch/branches/mishehu/src/mod/endpoints/mod_portaudio/mod_PortAudio.vcproj
   freeswitch/branches/mishehu/src/mod/endpoints/mod_woomera/mod_woomera.vcproj
   freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp
   freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.vcproj
   freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.vcproj
   freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_socket/mod_event_socket.vcproj
   freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_test/mod_event_test.vcproj
   freeswitch/branches/mishehu/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c
   freeswitch/branches/mishehu/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.vcproj
   freeswitch/branches/mishehu/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.vcproj
   freeswitch/branches/mishehu/src/mod/languages/mod_perl/fs_perl.vcproj
   freeswitch/branches/mishehu/src/mod/languages/mod_perl/mod_perl.vcproj
   freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
   freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/mod_spidermonkey.vcproj
   freeswitch/branches/mishehu/src/mod/loggers/mod_console/mod_console.vcproj
   freeswitch/branches/mishehu/src/mod/loggers/mod_syslog/mod_syslog.c
   freeswitch/branches/mishehu/src/mod/timers/mod_softtimer/mod_softtimer.vcproj
   freeswitch/branches/mishehu/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.vcproj
   freeswitch/branches/mishehu/src/switch.c
   freeswitch/branches/mishehu/src/switch_channel.c
   freeswitch/branches/mishehu/src/switch_console.c
   freeswitch/branches/mishehu/src/switch_core.c
   freeswitch/branches/mishehu/src/switch_event.c
   freeswitch/branches/mishehu/src/switch_ivr.c
   freeswitch/branches/mishehu/src/switch_log.c
   freeswitch/branches/mishehu/src/switch_stun.c
   freeswitch/branches/mishehu/src/switch_utils.c
   freeswitch/branches/mishehu/src/switch_xml.c
   freeswitch/branches/mishehu/w32/Setup/Setup.vdproj
   freeswitch/branches/mishehu/w32/vsnet/FreeSwitchConsole.vcproj
   freeswitch/branches/mishehu/w32/vsnet/FreeSwitchCore.vcproj
   freeswitch/branches/mishehu/w32/vsnet/FreeSwitchVersion.vcproj
   freeswitch/branches/mishehu/w32/vsnet/GetLibs.vbs

Log:
Started working on SqliteCDR.  Merged up to trunk r2406.

Modified: freeswitch/branches/mishehu/AUTHORS
==============================================================================
--- freeswitch/branches/mishehu/AUTHORS	(original)
+++ freeswitch/branches/mishehu/AUTHORS	Sun Aug 27 11:43:21 2006
@@ -27,4 +27,4 @@
 A big THANK YOU goes to:
 
 Justin Cassidy - Build related cleanups and automatic build setup.
-
+Bret McDanel - Javascript Documentation, constant feedback and input, many other things I am sure I am forgetting.

Modified: freeswitch/branches/mishehu/Makefile.am
==============================================================================
--- freeswitch/branches/mishehu/Makefile.am	(original)
+++ freeswitch/branches/mishehu/Makefile.am	Sun Aug 27 11:43:21 2006
@@ -3,7 +3,7 @@
 EXTRA_DIST =
 SUBDIRS = 
 AUTOMAKE_OPTS = gnu foreign
-AM_MAKE=`which gmake 2>/dev/null || which make 2>/dev/null || make`
+AM_MAKE=`which gmake 2>/dev/null || which make 2>/dev/null || echo make`
 MAKE=$(AM_MAKE)
 NAME=freeswitch
 PREFIX=$(prefix)

Modified: freeswitch/branches/mishehu/Makefile.in
==============================================================================
--- freeswitch/branches/mishehu/Makefile.in	(original)
+++ freeswitch/branches/mishehu/Makefile.in	Sun Aug 27 11:43:21 2006
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004  Free Software Foundation, Inc.
+# 2003, 2004, 2005  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,8 +17,6 @@
 
 
 
-SOURCES = $(libfreeswitch_la_SOURCES) $(nodist_libfreeswitch_la_SOURCES) $(freeswitch_SOURCES)
-
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
@@ -105,11 +103,11 @@
 am__depfiles_maybe = depfiles
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
 	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
 	$(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
 SOURCES = $(libfreeswitch_la_SOURCES) \
 	$(nodist_libfreeswitch_la_SOURCES) $(freeswitch_SOURCES)
@@ -243,7 +241,7 @@
 EXTRA_DIST = 
 SUBDIRS = 
 AUTOMAKE_OPTS = gnu foreign
-AM_MAKE = `which gmake 2>/dev/null || which make 2>/dev/null || make`
+AM_MAKE = `which gmake 2>/dev/null || which make 2>/dev/null || echo make`
 MAKE = $(AM_MAKE)
 NAME = freeswitch
 PREFIX = $(prefix)
@@ -538,109 +536,109 @@
 @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
 
 libfreeswitch_la-switch_rtp.lo: src/switch_rtp.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_rtp.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_rtp.Tpo" -c -o libfreeswitch_la-switch_rtp.lo `test -f 'src/switch_rtp.c' || echo '$(srcdir)/'`src/switch_rtp.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_rtp.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_rtp.Tpo" -c -o libfreeswitch_la-switch_rtp.lo `test -f 'src/switch_rtp.c' || echo '$(srcdir)/'`src/switch_rtp.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_rtp.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_rtp.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_rtp.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_rtp.c' object='libfreeswitch_la-switch_rtp.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_rtp.lo `test -f 'src/switch_rtp.c' || echo '$(srcdir)/'`src/switch_rtp.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_rtp.lo `test -f 'src/switch_rtp.c' || echo '$(srcdir)/'`src/switch_rtp.c
 
 libfreeswitch_la-switch_buffer.lo: src/switch_buffer.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_buffer.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_buffer.Tpo" -c -o libfreeswitch_la-switch_buffer.lo `test -f 'src/switch_buffer.c' || echo '$(srcdir)/'`src/switch_buffer.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_buffer.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_buffer.Tpo" -c -o libfreeswitch_la-switch_buffer.lo `test -f 'src/switch_buffer.c' || echo '$(srcdir)/'`src/switch_buffer.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_buffer.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_buffer.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_buffer.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_buffer.c' object='libfreeswitch_la-switch_buffer.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_buffer.lo `test -f 'src/switch_buffer.c' || echo '$(srcdir)/'`src/switch_buffer.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_buffer.lo `test -f 'src/switch_buffer.c' || echo '$(srcdir)/'`src/switch_buffer.c
 
 libfreeswitch_la-switch_caller.lo: src/switch_caller.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_caller.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_caller.Tpo" -c -o libfreeswitch_la-switch_caller.lo `test -f 'src/switch_caller.c' || echo '$(srcdir)/'`src/switch_caller.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_caller.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_caller.Tpo" -c -o libfreeswitch_la-switch_caller.lo `test -f 'src/switch_caller.c' || echo '$(srcdir)/'`src/switch_caller.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_caller.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_caller.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_caller.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_caller.c' object='libfreeswitch_la-switch_caller.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_caller.lo `test -f 'src/switch_caller.c' || echo '$(srcdir)/'`src/switch_caller.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_caller.lo `test -f 'src/switch_caller.c' || echo '$(srcdir)/'`src/switch_caller.c
 
 libfreeswitch_la-switch_channel.lo: src/switch_channel.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_channel.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_channel.Tpo" -c -o libfreeswitch_la-switch_channel.lo `test -f 'src/switch_channel.c' || echo '$(srcdir)/'`src/switch_channel.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_channel.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_channel.Tpo" -c -o libfreeswitch_la-switch_channel.lo `test -f 'src/switch_channel.c' || echo '$(srcdir)/'`src/switch_channel.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_channel.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_channel.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_channel.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_channel.c' object='libfreeswitch_la-switch_channel.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_channel.lo `test -f 'src/switch_channel.c' || echo '$(srcdir)/'`src/switch_channel.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_channel.lo `test -f 'src/switch_channel.c' || echo '$(srcdir)/'`src/switch_channel.c
 
 libfreeswitch_la-switch_config.lo: src/switch_config.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_config.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_config.Tpo" -c -o libfreeswitch_la-switch_config.lo `test -f 'src/switch_config.c' || echo '$(srcdir)/'`src/switch_config.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_config.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_config.Tpo" -c -o libfreeswitch_la-switch_config.lo `test -f 'src/switch_config.c' || echo '$(srcdir)/'`src/switch_config.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_config.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_config.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_config.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_config.c' object='libfreeswitch_la-switch_config.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_config.lo `test -f 'src/switch_config.c' || echo '$(srcdir)/'`src/switch_config.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_config.lo `test -f 'src/switch_config.c' || echo '$(srcdir)/'`src/switch_config.c
 
 libfreeswitch_la-switch_console.lo: src/switch_console.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_console.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_console.Tpo" -c -o libfreeswitch_la-switch_console.lo `test -f 'src/switch_console.c' || echo '$(srcdir)/'`src/switch_console.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_console.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_console.Tpo" -c -o libfreeswitch_la-switch_console.lo `test -f 'src/switch_console.c' || echo '$(srcdir)/'`src/switch_console.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_console.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_console.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_console.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_console.c' object='libfreeswitch_la-switch_console.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_console.lo `test -f 'src/switch_console.c' || echo '$(srcdir)/'`src/switch_console.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_console.lo `test -f 'src/switch_console.c' || echo '$(srcdir)/'`src/switch_console.c
 
 libfreeswitch_la-switch_core.lo: src/switch_core.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_core.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_core.Tpo" -c -o libfreeswitch_la-switch_core.lo `test -f 'src/switch_core.c' || echo '$(srcdir)/'`src/switch_core.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_core.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_core.Tpo" -c -o libfreeswitch_la-switch_core.lo `test -f 'src/switch_core.c' || echo '$(srcdir)/'`src/switch_core.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_core.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_core.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_core.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_core.c' object='libfreeswitch_la-switch_core.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_core.lo `test -f 'src/switch_core.c' || echo '$(srcdir)/'`src/switch_core.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_core.lo `test -f 'src/switch_core.c' || echo '$(srcdir)/'`src/switch_core.c
 
 libfreeswitch_la-switch_loadable_module.lo: src/switch_loadable_module.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_loadable_module.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_loadable_module.Tpo" -c -o libfreeswitch_la-switch_loadable_module.lo `test -f 'src/switch_loadable_module.c' || echo '$(srcdir)/'`src/switch_loadable_module.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_loadable_module.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_loadable_module.Tpo" -c -o libfreeswitch_la-switch_loadable_module.lo `test -f 'src/switch_loadable_module.c' || echo '$(srcdir)/'`src/switch_loadable_module.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_loadable_module.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_loadable_module.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_loadable_module.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_loadable_module.c' object='libfreeswitch_la-switch_loadable_module.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_loadable_module.lo `test -f 'src/switch_loadable_module.c' || echo '$(srcdir)/'`src/switch_loadable_module.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_loadable_module.lo `test -f 'src/switch_loadable_module.c' || echo '$(srcdir)/'`src/switch_loadable_module.c
 
 libfreeswitch_la-switch_utils.lo: src/switch_utils.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_utils.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_utils.Tpo" -c -o libfreeswitch_la-switch_utils.lo `test -f 'src/switch_utils.c' || echo '$(srcdir)/'`src/switch_utils.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_utils.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_utils.Tpo" -c -o libfreeswitch_la-switch_utils.lo `test -f 'src/switch_utils.c' || echo '$(srcdir)/'`src/switch_utils.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_utils.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_utils.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_utils.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_utils.c' object='libfreeswitch_la-switch_utils.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_utils.lo `test -f 'src/switch_utils.c' || echo '$(srcdir)/'`src/switch_utils.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_utils.lo `test -f 'src/switch_utils.c' || echo '$(srcdir)/'`src/switch_utils.c
 
 libfreeswitch_la-switch_event.lo: src/switch_event.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_event.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_event.Tpo" -c -o libfreeswitch_la-switch_event.lo `test -f 'src/switch_event.c' || echo '$(srcdir)/'`src/switch_event.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_event.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_event.Tpo" -c -o libfreeswitch_la-switch_event.lo `test -f 'src/switch_event.c' || echo '$(srcdir)/'`src/switch_event.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_event.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_event.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_event.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_event.c' object='libfreeswitch_la-switch_event.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_event.lo `test -f 'src/switch_event.c' || echo '$(srcdir)/'`src/switch_event.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_event.lo `test -f 'src/switch_event.c' || echo '$(srcdir)/'`src/switch_event.c
 
 libfreeswitch_la-switch_resample.lo: src/switch_resample.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_resample.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_resample.Tpo" -c -o libfreeswitch_la-switch_resample.lo `test -f 'src/switch_resample.c' || echo '$(srcdir)/'`src/switch_resample.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_resample.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_resample.Tpo" -c -o libfreeswitch_la-switch_resample.lo `test -f 'src/switch_resample.c' || echo '$(srcdir)/'`src/switch_resample.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_resample.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_resample.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_resample.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_resample.c' object='libfreeswitch_la-switch_resample.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_resample.lo `test -f 'src/switch_resample.c' || echo '$(srcdir)/'`src/switch_resample.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_resample.lo `test -f 'src/switch_resample.c' || echo '$(srcdir)/'`src/switch_resample.c
 
 libfreeswitch_la-switch_ivr.lo: src/switch_ivr.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_ivr.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_ivr.Tpo" -c -o libfreeswitch_la-switch_ivr.lo `test -f 'src/switch_ivr.c' || echo '$(srcdir)/'`src/switch_ivr.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_ivr.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_ivr.Tpo" -c -o libfreeswitch_la-switch_ivr.lo `test -f 'src/switch_ivr.c' || echo '$(srcdir)/'`src/switch_ivr.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_ivr.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_ivr.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_ivr.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_ivr.c' object='libfreeswitch_la-switch_ivr.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_ivr.lo `test -f 'src/switch_ivr.c' || echo '$(srcdir)/'`src/switch_ivr.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_ivr.lo `test -f 'src/switch_ivr.c' || echo '$(srcdir)/'`src/switch_ivr.c
 
 libfreeswitch_la-switch_stun.lo: src/switch_stun.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_stun.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_stun.Tpo" -c -o libfreeswitch_la-switch_stun.lo `test -f 'src/switch_stun.c' || echo '$(srcdir)/'`src/switch_stun.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_stun.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_stun.Tpo" -c -o libfreeswitch_la-switch_stun.lo `test -f 'src/switch_stun.c' || echo '$(srcdir)/'`src/switch_stun.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_stun.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_stun.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_stun.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_stun.c' object='libfreeswitch_la-switch_stun.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_stun.lo `test -f 'src/switch_stun.c' || echo '$(srcdir)/'`src/switch_stun.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_stun.lo `test -f 'src/switch_stun.c' || echo '$(srcdir)/'`src/switch_stun.c
 
 libfreeswitch_la-switch_log.lo: src/switch_log.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_log.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_log.Tpo" -c -o libfreeswitch_la-switch_log.lo `test -f 'src/switch_log.c' || echo '$(srcdir)/'`src/switch_log.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_log.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_log.Tpo" -c -o libfreeswitch_la-switch_log.lo `test -f 'src/switch_log.c' || echo '$(srcdir)/'`src/switch_log.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_log.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_log.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_log.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_log.c' object='libfreeswitch_la-switch_log.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_log.lo `test -f 'src/switch_log.c' || echo '$(srcdir)/'`src/switch_log.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_log.lo `test -f 'src/switch_log.c' || echo '$(srcdir)/'`src/switch_log.c
 
 libfreeswitch_la-switch_xml.lo: src/switch_xml.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_xml.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_xml.Tpo" -c -o libfreeswitch_la-switch_xml.lo `test -f 'src/switch_xml.c' || echo '$(srcdir)/'`src/switch_xml.c; \
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_xml.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_xml.Tpo" -c -o libfreeswitch_la-switch_xml.lo `test -f 'src/switch_xml.c' || echo '$(srcdir)/'`src/switch_xml.c; \
 @am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libfreeswitch_la-switch_xml.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_xml.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_xml.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/switch_xml.c' object='libfreeswitch_la-switch_xml.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_xml.lo `test -f 'src/switch_xml.c' || echo '$(srcdir)/'`src/switch_xml.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_xml.lo `test -f 'src/switch_xml.c' || echo '$(srcdir)/'`src/switch_xml.c
 
 freeswitch-switch.o: src/switch.c
 @am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(freeswitch_CFLAGS) $(CFLAGS) -MT freeswitch-switch.o -MD -MP -MF "$(DEPDIR)/freeswitch-switch.Tpo" -c -o freeswitch-switch.o `test -f 'src/switch.c' || echo '$(srcdir)/'`src/switch.c; \
@@ -690,7 +688,13 @@
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@set fnord $$MAKEFLAGS; amf=$$2; \
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -702,7 +706,7 @@
 	    local_target="$$target"; \
 	  fi; \
 	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -710,7 +714,13 @@
 
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-	@set fnord $$MAKEFLAGS; amf=$$2; \
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
 	dot_seen=no; \
 	case "$@" in \
 	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -731,7 +741,7 @@
 	    local_target="$$target"; \
 	  fi; \
 	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -1098,6 +1108,7 @@
 	@if [ ! -f $(PWD)/modules.conf ] ; then cp $(PWD)/modules.conf.in $(PWD)/modules.conf ; fi
 	@echo making modules
 	@rm -f build/freeswitch.env
+	@if [ -f $(PWD)/modbuild.env ] ; then cp $(PWD)/modbuild.env build/freeswitch.env ; fi
 	@./build/addenv.sh build/freeswitch.env MAKE "$(MAKE)"
 	@./build/addenv.sh build/freeswitch.env DYLD_LIBRARY_PATH "$(PREFIX)/lib:$DYLD_LIBRARY_PATH"
 	@./build/addenv.sh build/freeswitch.env LD_LIBRARY_PATH "$(PREFIX)/lib:$LD_LIBRARY_PATH"

Modified: freeswitch/branches/mishehu/aclocal.m4
==============================================================================
--- freeswitch/branches/mishehu/aclocal.m4	(original)
+++ freeswitch/branches/mishehu/aclocal.m4	Sun Aug 27 11:43:21 2006
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -123,7 +123,7 @@
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
+Xsed='sed -e 1s/^X//'
 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
 # Same as above, but do not quote variable references.
@@ -143,7 +143,7 @@
 default_ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a `.a' archive for static linking (except M$VC,
+# All known linkers require a `.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 ltmain="$ac_aux_dir/ltmain.sh"
@@ -191,6 +191,8 @@
   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 fi
 
+_LT_CC_BASENAME([$compiler])
+
 # Only perform the check for file, if the check method requires it
 case $deplibs_check_method in
 file_magic*)
@@ -236,6 +238,48 @@
 ])# _LT_AC_SYS_COMPILER
 
 
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+AC_DEFUN([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+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
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+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
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_LINKER_BOILERPLATE
+
+
 # _LT_AC_SYS_LIBPATH_AIX
 # ----------------------
 # Links a minimal program and checks the executable
@@ -308,15 +352,15 @@
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 if test -z "$ECHO"; then
 if test "X${echo_test_string+set}" != Xset; then
 # find a string as large as possible, as long as the shell can cope with it
   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
-       echo_test_string="`eval $cmd`" &&
+    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+       echo_test_string=`eval $cmd` &&
        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
     then
       break
@@ -485,7 +529,7 @@
   # 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
+    case `/usr/bin/file conftest.o` in
     *32-bit*)
       case $host in
         x86_64-*linux*)
@@ -567,7 +611,7 @@
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    # The option is referenced via a variable to avoid confusing sed.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
@@ -577,8 +621,10 @@
    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    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
-     if test ! -s conftest.err; then
+     # 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
        $2=yes
      fi
    fi
@@ -604,11 +650,16 @@
    LDFLAGS="$LDFLAGS $3"
    printf "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The compiler can only warn and ignore the option if not recognized
+     # The linker can only warn and ignore the option if not recognized
      # So say no if there are warnings
      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
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
      else
        $2=yes
      fi
@@ -667,11 +718,38 @@
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
- *)
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    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`
+    ;;
+  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
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    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
     # we can't tell.
-    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
 	       = "XX$teststring") >/dev/null 2>&1 &&
 	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
 	    lt_cv_sys_max_cmd_len=$new_result &&
@@ -776,7 +854,7 @@
 }]
 EOF
   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
     lt_status=$?
     case x$lt_status in
       x$lt_dlno_uscore) $1 ;;
@@ -925,7 +1003,7 @@
    # Note that $ac_compile itself does not contain backslashes and begins
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
@@ -937,11 +1015,13 @@
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     if test ! -s out/conftest.err; then
+     $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
        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
      fi
    fi
-   chmod u+w .
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
    $rm conftest*
    # SGI C++ compiler will create directory out/ii_files/ for
    # template instantiation
@@ -1005,8 +1085,8 @@
 [AC_MSG_CHECKING([how to hardcode library paths into programs])
 _LT_AC_TAGVAR(hardcode_action, $1)=
 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
-   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
-   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
+   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
+   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
   # We can hardcode non-existant directories.
   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
@@ -1173,7 +1253,7 @@
   shlibpath_var=LIBRARY_PATH
   ;;
 
-bsdi4*)
+bsdi[[45]]*)
   version_type=linux
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -1201,7 +1281,8 @@
       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname'
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
        $rm \$dlpath'
@@ -1231,7 +1312,7 @@
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
     ;;
@@ -1254,7 +1335,7 @@
   soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
   if test "$GCC" = yes; then
     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
@@ -1289,8 +1370,17 @@
   dynamic_linker='GNU ld.so'
   ;;
 
-freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
@@ -1308,7 +1398,7 @@
   freebsd2*)
     shlibpath_overrides_runpath=yes
     ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
     shlibpath_overrides_runpath=yes
     hardcode_into_libs=yes
     ;;
@@ -1335,7 +1425,7 @@
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  case "$host_cpu" in
+  case $host_cpu in
   ia64*)
     shrext_cmds='.so'
     hardcode_into_libs=yes
@@ -1432,27 +1522,10 @@
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-    if AC_TRY_EVAL(ac_compile); then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
-
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -1514,7 +1587,11 @@
 openbsd*)
   version_type=sunos
   need_lib_prefix=no
-  need_version=yes
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
@@ -1680,7 +1757,9 @@
 
       case $tagname in
       CXX)
-	if test -n "$CXX" && test "X$CXX" != "Xno"; then
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
 	  AC_LIBTOOL_LANG_CXX_CONFIG
 	else
 	  tagname=""
@@ -1742,7 +1821,7 @@
 
 # AC_LIBTOOL_WIN32_DLL
 # --------------------
-# declare package support for building win32 dll's
+# declare package support for building win32 DLLs
 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
 ])# AC_LIBTOOL_WIN32_DLL
@@ -1916,7 +1995,7 @@
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
-	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
@@ -2026,7 +2105,7 @@
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
       lt_cv_path_LD="$ac_dir/$ac_prog"
       # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
+      # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
@@ -2058,7 +2137,7 @@
 AC_DEFUN([AC_PROG_LD_GNU],
 [AC_REQUIRE([AC_PROG_EGREP])dnl
 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
   lt_cv_prog_gnu_ld=yes
@@ -2085,6 +2164,15 @@
 *) reload_flag=" $reload_flag" ;;
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
 ])# AC_PROG_LD_RELOAD_FLAG
 
 
@@ -2118,7 +2206,7 @@
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-bsdi4*)
+bsdi[[45]]*)
   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
   lt_cv_file_magic_cmd='/usr/bin/file -L'
   lt_cv_file_magic_test_file=/shlib/libc.so
@@ -2141,13 +2229,13 @@
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd* | kfreebsd*-gnu)
+freebsd* | kfreebsd*-gnu | dragonfly*)
   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
       # Not sure whether the presence of OpenBSD here was a mistake.
       # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
       lt_cv_file_magic_cmd=/usr/bin/file
       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
       ;;
@@ -2163,7 +2251,7 @@
 
 hpux10.20* | hpux11*)
   lt_cv_file_magic_cmd=/usr/bin/file
-  case "$host_cpu" in
+  case $host_cpu in
   ia64*)
     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
@@ -2191,15 +2279,6 @@
 
 # This must be Linux ELF.
 linux*)
-  case $host_cpu in
-  alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*)
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
-  esac
-  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -2222,12 +2301,10 @@
   ;;
 
 openbsd*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
   else
-    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
   fi
   ;;
 
@@ -2348,13 +2425,13 @@
 # -----------------------------------
 # sets LIBLTDL to the link flags for the libltdl convenience library and
 # LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
-# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
-# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!).  If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
+# --enable-ltdl-convenience to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
+# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
+# (note the single quotes!).  If your package is not flat and you're not
+# using automake, define top_builddir and top_srcdir appropriately in
+# the Makefiles.
 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   case $enable_ltdl_convenience in
@@ -2373,13 +2450,13 @@
 # -----------------------------------
 # sets LIBLTDL to the link flags for the libltdl installable library and
 # LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
-# DIRECTORY is not provided and an installed libltdl is not found, it is
-# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
-# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
-# quotes!).  If your package is not flat and you're not using automake,
-# define top_builddir and top_srcdir appropriately in the Makefiles.
+# --enable-ltdl-install to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# and an installed libltdl is not found, it is assumed to be `libltdl'.
+# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
+# '${top_srcdir}/' (note the single quotes!).  If your package is not
+# flat and you're not using automake, define top_builddir and top_srcdir
+# appropriately in the Makefiles.
 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
@@ -2417,10 +2494,21 @@
 # ---------------
 AC_DEFUN([_LT_AC_LANG_CXX],
 [AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
 ])# _LT_AC_LANG_CXX
 
+# _LT_AC_PROG_CXXCPP
+# ---------------
+AC_DEFUN([_LT_AC_PROG_CXXCPP],
+[
+AC_REQUIRE([AC_PROG_CXX])
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+fi
+])# _LT_AC_PROG_CXXCPP
 
 # AC_LIBTOOL_F77
 # --------------
@@ -2493,6 +2581,10 @@
 
 _LT_AC_SYS_COMPILER
 
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
 #
 # Check for any special shared library compilation flags.
 #
@@ -2543,7 +2635,7 @@
 
 # On AIX, shared libraries and static libraries use the same namespace, and
 # are all built from PIC.
-case "$host_os" in
+case $host_os in
 aix3*)
   test "$enable_shared" = yes && enable_static=no
   if test -n "$RANLIB"; then
@@ -2556,43 +2648,6 @@
   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
     test "$enable_shared" = yes && enable_static=no
   fi
-  ;;
-  darwin* | rhapsody*)
-  if test "$GCC" = yes; then
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    case "$host_os" in
-    rhapsody* | darwin1.[[012]])
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
-      ;;
-    *) # Darwin 1.3 on
-      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-      	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-      else
-        case ${MACOSX_DEPLOYMENT_TARGET} in
-          10.[[012]])
-            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-            ;;
-          10.*)
-            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
-            ;;
-        esac
-      fi
-      ;;
-    esac
-    output_verbose_link_cmd='echo'
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
-    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    _LT_AC_TAGVAR(hardcode_direct, $1)=no
-    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-  else
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-  fi
     ;;
 esac
 AC_MSG_RESULT([$enable_shared])
@@ -2618,7 +2673,7 @@
 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
 [AC_LANG_PUSH(C++)
 AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 
 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
@@ -2647,7 +2702,7 @@
 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
 # Source file extension for C++ test sources.
-ac_ext=cc
+ac_ext=cpp
 
 # Object file extension for compiled C++ test sources.
 objext=o
@@ -2662,6 +2717,10 @@
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 _LT_AC_SYS_COMPILER
 
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
 # Allow CC to be a program name with arguments.
 lt_save_CC=$CC
 lt_save_LD=$LD
@@ -2683,7 +2742,7 @@
 CC=${CXX-"c++"}
 compiler=$CC
 _LT_AC_TAGVAR(compiler, $1)=$CC
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+_LT_CC_BASENAME([$compiler])
 
 # We don't want -fno-exception wen compiling C++ code, so set the
 # no_builtin_flag separately
@@ -2790,7 +2849,7 @@
     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
     if test "$GXX" = yes; then
-      case $host_os in aix4.[012]|aix4.[012].*)
+      case $host_os in aix4.[[012]]|aix4.[[012]].*)
       # We only want to do this on AIX 4.2 and lower, the check
       # below for broken collect2 doesn't work under 4.3+
 	collect2name=`${CC} -print-prog-name=collect2`
@@ -2811,6 +2870,9 @@
 	fi
       esac
       shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
     else
       # not using gcc
       if test "$host_cpu" = ia64; then
@@ -2856,7 +2918,7 @@
 	# Exported symbols can be pulled into shared objects from archives
 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-	# This is similar to how AIX traditionally builds it's shared libraries.
+	# 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'
       fi
     fi
@@ -2870,6 +2932,7 @@
     esac
     ;;
 
+
   cygwin* | mingw* | pw32*)
     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
     # as there is no search path for DLLs.
@@ -2893,65 +2956,76 @@
       _LT_AC_TAGVAR(ld_shlibs, $1)=no
     fi
   ;;
+      darwin* | rhapsody*)
+        case $host_os in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+        esac
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
-  darwin* | rhapsody*)
-  if test "$GXX" = yes; then
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    case "$host_os" in
-    rhapsody* | darwin1.[[012]])
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
-      ;;
-    *) # Darwin 1.3 on
-      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-      	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
+      fi
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
       else
-        case ${MACOSX_DEPLOYMENT_TARGET} in
-          10.[[012]])
-            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-            ;;
-          10.*)
-            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
-            ;;
-        esac
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        fi
+        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          else
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          fi
+            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
       fi
-      ;;
-    esac
-    lt_int_apple_cc_single_mod=no
-    output_verbose_link_cmd='echo'
-    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
-      lt_int_apple_cc_single_mod=yes
-    fi
-    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-    else
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-    fi
-    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        ;;
 
-    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    fi
-    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    _LT_AC_TAGVAR(hardcode_direct, $1)=no
-    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-  else
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-  fi
-    ;;
-
   dgux*)
     case $cc_basename in
-      ec++)
+      ec++*)
 	# FIXME: insert proper C++ library support
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
 	;;
-      ghcx)
+      ghcx*)
 	# Green Hills C++ Compiler
 	# FIXME: insert proper C++ library support
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
@@ -2962,14 +3036,14 @@
 	;;
     esac
     ;;
-  freebsd[12]*)
+  freebsd[[12]]*)
     # C++ shared libraries reported to be fairly broken before switch to ELF
     _LT_AC_TAGVAR(ld_shlibs, $1)=no
     ;;
   freebsd-elf*)
     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
     ;;
-  freebsd* | kfreebsd*-gnu)
+  freebsd* | kfreebsd*-gnu | dragonfly*)
     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
     # conventions
     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
@@ -2986,11 +3060,11 @@
 				# location of the library.
 
     case $cc_basename in
-    CC)
+    CC*)
       # FIXME: insert proper C++ library support
       _LT_AC_TAGVAR(ld_shlibs, $1)=no
       ;;
-    aCC)
+    aCC*)
       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       # Commands to make compiler produce verbose output that lists
       # what "hidden" libraries, object files and flags are used when
@@ -3000,7 +3074,7 @@
       # explicitly linking system object files so we need to strip them
       # from the output so that they don't get included in the library
       # dependencies.
-      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
       ;;
     *)
       if test "$GXX" = yes; then
@@ -3014,7 +3088,7 @@
     ;;
   hpux10*|hpux11*)
     if test $with_gnu_ld = no; then
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*)
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
@@ -3030,7 +3104,7 @@
         ;;
       esac
     fi
-    case "$host_cpu" in
+    case $host_cpu in
     hppa*64*)
       _LT_AC_TAGVAR(hardcode_direct, $1)=no
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -3051,12 +3125,12 @@
     esac
 
     case $cc_basename in
-      CC)
+      CC*)
 	# FIXME: insert proper C++ library support
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
 	;;
-      aCC)
-	case "$host_cpu" in
+      aCC*)
+	case $host_cpu in
 	hppa*64*|ia64*)
 	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 	  ;;
@@ -3077,7 +3151,7 @@
       *)
 	if test "$GXX" = yes; then
 	  if test $with_gnu_ld = no; then
-	    case "$host_cpu" in
+	    case $host_cpu in
 	    ia64*|hppa*64*)
 	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 	      ;;
@@ -3095,9 +3169,9 @@
     ;;
   irix5* | irix6*)
     case $cc_basename in
-      CC)
+      CC*)
 	# SGI C++
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
 	# Archives containing C++ object files must be created using
 	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
@@ -3108,7 +3182,7 @@
       *)
 	if test "$GXX" = yes; then
 	  if test "$with_gnu_ld" = no; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	  else
 	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
 	  fi
@@ -3121,7 +3195,7 @@
     ;;
   linux*)
     case $cc_basename in
-      KCC)
+      KCC*)
 	# Kuck and Associates, Inc. (KAI) C++ Compiler
 
 	# KCC will only create a shared library if the output file
@@ -3146,17 +3220,41 @@
 	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
 	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 	;;
-      icpc)
+      icpc*)
 	# Intel C++
 	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
 	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 	;;
-      cxx)
+      pgCC*)
+        # Portland Group C++ compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        ;;
+      cxx*)
 	# Compaq C++
 	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
@@ -3187,7 +3285,7 @@
     ;;
   mvs*)
     case $cc_basename in
-      cxx)
+      cxx*)
 	# FIXME: insert proper C++ library support
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
 	;;
@@ -3208,9 +3306,25 @@
     # Workaround some broken pre-1.5 toolchains
     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
     ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  openbsd*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    fi
+    output_verbose_link_cmd='echo'
+    ;;
   osf3*)
     case $cc_basename in
-      KCC)
+      KCC*)
 	# Kuck and Associates, Inc. (KAI) C++ Compiler
 
 	# KCC will only create a shared library if the output file
@@ -3226,14 +3340,14 @@
 	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
 	;;
-      RCC)
+      RCC*)
 	# Rational C++ 2.4.1
 	# FIXME: insert proper C++ library support
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
 	;;
-      cxx)
+      cxx*)
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -3251,7 +3365,7 @@
       *)
 	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
 	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -3270,7 +3384,7 @@
     ;;
   osf4* | osf5*)
     case $cc_basename in
-      KCC)
+      KCC*)
 	# Kuck and Associates, Inc. (KAI) C++ Compiler
 
 	# KCC will only create a shared library if the output file
@@ -3285,17 +3399,17 @@
 	# the KAI C++ compiler.
 	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
 	;;
-      RCC)
+      RCC*)
 	# Rational C++ 2.4.1
 	# FIXME: insert proper C++ library support
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
 	;;
-      cxx)
+      cxx*)
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 	  echo "-hidden">> $lib.exp~
-	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
+	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
 	  $rm $lib.exp'
 
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -3314,7 +3428,7 @@
       *)
 	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
 	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -3338,7 +3452,7 @@
   sco*)
     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
     case $cc_basename in
-      CC)
+      CC*)
 	# FIXME: insert proper C++ library support
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
 	;;
@@ -3350,12 +3464,12 @@
     ;;
   sunos4*)
     case $cc_basename in
-      CC)
+      CC*)
 	# Sun C++ 4.x
 	# FIXME: insert proper C++ library support
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
 	;;
-      lcc)
+      lcc*)
 	# Lucid
 	# FIXME: insert proper C++ library support
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
@@ -3368,36 +3482,33 @@
     ;;
   solaris*)
     case $cc_basename in
-      CC)
+      CC*)
 	# Sun C++ 4.2, 5.x and Centerline C++
+        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
 	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_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~
-	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 	case $host_os in
-	  solaris2.[0-5] | solaris2.[0-5].*) ;;
+	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 	  *)
 	    # The C++ compiler is used as linker so we must use $wl
 	    # flag to pass the commands to the underlying system
-	    # linker.
+	    # linker. We must also pass each convience library through
+	    # to the system linker between allextract/defaultextract.
+	    # The C++ compiler will combine linker options so we
+	    # cannot just pass the convience library names through
+	    # without $wl.
 	    # Supported since Solaris 2.6 (maybe 2.5.1?)
-	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
 	    ;;
 	esac
 	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	output_verbose_link_cmd='echo'
 
 	# Archives containing C++ object files must be created using
 	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -3405,7 +3516,7 @@
 	# in the archive.
 	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 	;;
-      gcx)
+      gcx*)
 	# Green Hills C++ Compiler
 	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
@@ -3448,7 +3559,7 @@
     ;;
   tandem*)
     case $cc_basename in
-      NCC)
+      NCC*)
 	# NonStop-UX NCC 3.20
 	# FIXME: insert proper C++ library support
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
@@ -3554,7 +3665,7 @@
   # The `*' in the case matches for architectures that use `case' in
   # $output_verbose_cmd can trigger glob expansion during the loop
   # eval without this substitution.
-  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
 
   for p in `eval $output_verbose_link_cmd`; do
     case $p in
@@ -3630,6 +3741,21 @@
 
 $rm -f confest.$objext
 
+# PORTME: override above test on systems where it is broken
+ifelse([$1],[CXX],
+[case $host_os in
+solaris*)
+  case $cc_basename in
+  CC*)
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+    ;;
+  esac
+esac
+])
+
 case " $_LT_AC_TAGVAR(postdeps, $1) " in
 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 esac
@@ -3680,12 +3806,16 @@
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 _LT_AC_SYS_COMPILER
 
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
 # Allow CC to be a program name with arguments.
 lt_save_CC="$CC"
 CC=${F77-"f77"}
 compiler=$CC
 _LT_AC_TAGVAR(compiler, $1)=$CC
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+_LT_CC_BASENAME([$compiler])
 
 AC_MSG_CHECKING([if libtool supports shared libraries])
 AC_MSG_RESULT([$can_build_shared])
@@ -3695,7 +3825,7 @@
 
 # On AIX, shared libraries and static libraries use the same namespace, and
 # are all built from PIC.
-case "$host_os" in
+case $host_os in
 aix3*)
   test "$enable_shared" = yes && enable_static=no
   if test -n "$RANLIB"; then
@@ -3704,7 +3834,9 @@
   fi
   ;;
 aix4* | aix5*)
-  test "$enable_shared" = yes && enable_static=no
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
   ;;
 esac
 AC_MSG_RESULT([$enable_shared])
@@ -3755,20 +3887,27 @@
 lt_simple_compile_test_code="class foo {}\n"
 
 # Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
 
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 _LT_AC_SYS_COMPILER
 
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
 # Allow CC to be a program name with arguments.
 lt_save_CC="$CC"
 CC=${GCJ-"gcj"}
 compiler=$CC
 _LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
 
 # GCJ did not exist at the time GCC didn't implicitly link libc in.
 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 AC_LIBTOOL_PROG_COMPILER_PIC($1)
 AC_LIBTOOL_PROG_CC_C_O($1)
@@ -3811,11 +3950,16 @@
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 _LT_AC_SYS_COMPILER
 
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
 # Allow CC to be a program name with arguments.
 lt_save_CC="$CC"
 CC=${RC-"windres"}
 compiler=$CC
 _LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
 AC_LIBTOOL_CONFIG($1)
@@ -3951,7 +4095,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -3962,11 +4106,11 @@
 SED=$lt_SED
 
 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e s/^X//"
+Xsed="$SED -e 1s/^X//"
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 # The names of the tagged configurations supported by this script.
 available_tags=
@@ -3997,7 +4141,13 @@
 # The host system.
 host_alias=$host_alias
 host=$host
+host_os=$host_os
 
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
 # An echo program that does not interpret backslashes.
 echo=$lt_echo
 
@@ -4073,7 +4223,7 @@
 # Does compiler simultaneously support -c and -o options?
 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
 
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
 need_locks=$lt_need_locks
 
 # Do we need the lib prefix for modules?
@@ -4347,9 +4497,6 @@
 # Regexp to match symbols that can be accessed directly from C.
 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
 # Transform an extracted symbol line into a proper C declaration
 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
@@ -4371,6 +4518,13 @@
   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
   ;;
+linux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDGIRSTW]]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
 irix* | nonstopux*)
   symcode='[[BCDEGRST]]'
   ;;
@@ -4402,8 +4556,11 @@
 # Try without a prefix undercore, then with it.
 for ac_symprfx in "" "_"; do
 
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
   # Write the raw and C identifiers.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -4567,7 +4724,7 @@
     hpux*)
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*|ia64*)
 	;;
       *)
@@ -4592,18 +4749,28 @@
 	;;
       chorus*)
 	case $cc_basename in
-	cxch68)
+	cxch68*)
 	  # Green Hills C++ Compiler
 	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
 	  ;;
 	esac
 	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case $cc_basename in
+           xlc*)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           ;;
+         esac
+       ;;
       dgux*)
 	case $cc_basename in
-	  ec++)
+	  ec++*)
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	    ;;
-	  ghcx)
+	  ghcx*)
 	    # Green Hills C++ Compiler
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 	    ;;
@@ -4611,22 +4778,22 @@
 	    ;;
 	esac
 	;;
-      freebsd* | kfreebsd*-gnu)
+      freebsd* | kfreebsd*-gnu | dragonfly*)
 	# FreeBSD uses GNU C++
 	;;
       hpux9* | hpux10* | hpux11*)
 	case $cc_basename in
-	  CC)
+	  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"
 	    if test "$host_cpu" != ia64; then
 	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 	    fi
 	    ;;
-	  aCC)
+	  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"
-	    case "$host_cpu" in
+	    case $host_cpu in
 	    hppa*64*|ia64*)
 	      # +Z the default
 	      ;;
@@ -4641,7 +4808,7 @@
 	;;
       irix5* | irix6* | nonstopux*)
 	case $cc_basename in
-	  CC)
+	  CC*)
 	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 	    # CC pic flag -KPIC is the default.
@@ -4652,18 +4819,24 @@
 	;;
       linux*)
 	case $cc_basename in
-	  KCC)
+	  KCC*)
 	    # KAI C++ Compiler
 	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 	    ;;
-	  icpc)
+	  icpc* | ecpc*)
 	    # Intel C++
 	    _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)='-static'
 	    ;;
-	  cxx)
+	  pgCC*)
+	    # Portland Group C++ compiler.
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  cxx*)
 	    # Compaq C++
 	    # Make sure the PIC flag is empty.  It appears that all Alpha
 	    # Linux and Compaq Tru64 Unix objects are PIC.
@@ -4680,7 +4853,7 @@
 	;;
       mvs*)
 	case $cc_basename in
-	  cxx)
+	  cxx*)
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 	    ;;
 	  *)
@@ -4691,14 +4864,14 @@
 	;;
       osf3* | osf4* | osf5*)
 	case $cc_basename in
-	  KCC)
+	  KCC*)
 	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 	    ;;
-	  RCC)
+	  RCC*)
 	    # Rational C++ 2.4.1
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 	    ;;
-	  cxx)
+	  cxx*)
 	    # Digital/Compaq C++
 	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	    # Make sure the PIC flag is empty.  It appears that all Alpha
@@ -4714,7 +4887,7 @@
 	;;
       sco*)
 	case $cc_basename in
-	  CC)
+	  CC*)
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 	    ;;
 	  *)
@@ -4723,13 +4896,13 @@
 	;;
       solaris*)
 	case $cc_basename in
-	  CC)
+	  CC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 	    ;;
-	  gcx)
+	  gcx*)
 	    # Green Hills C++ Compiler
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 	    ;;
@@ -4739,12 +4912,12 @@
 	;;
       sunos4*)
 	case $cc_basename in
-	  CC)
+	  CC*)
 	    # Sun C++ 4.x
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	    ;;
-	  lcc)
+	  lcc*)
 	    # Lucid
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 	    ;;
@@ -4754,7 +4927,7 @@
 	;;
       tandem*)
 	case $cc_basename in
-	  NCC)
+	  NCC*)
 	    # NonStop-UX NCC 3.20
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	    ;;
@@ -4825,7 +4998,7 @@
     hpux*)
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*|ia64*)
 	# +Z the default
 	;;
@@ -4851,6 +5024,16 @@
 	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
       fi
       ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         ;;
+       esac
+       ;;
 
     mingw* | pw32* | os2*)
       # This hack is so that the source file can tell whether it is being
@@ -4862,7 +5045,7 @@
       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*|ia64*)
 	# +Z the default
 	;;
@@ -4886,12 +5069,19 @@
       ;;
 
     linux*)
-      case $CC in
+      case $cc_basename in
       icc* | ecc*)
 	_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)='-static'
         ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
       ccc*)
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
         # All Alpha code is PIC.
@@ -4912,9 +5102,14 @@
       ;;
 
     solaris*)
-      _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'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
       ;;
 
     sunos4*)
@@ -4936,6 +5131,11 @@
       fi
       ;;
 
+    unicos*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
     uts4*)
       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -4963,7 +5163,7 @@
     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 fi
-case "$host_os" in
+case $host_os in
   # For platforms which do not support PIC, -DPIC is meaningless:
   *djgpp*)
     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
@@ -4996,7 +5196,7 @@
     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
   ;;
   cygwin* | mingw*)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
   *)
     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -5039,7 +5239,8 @@
   # rely on this symbol name, it's probably fine to never include it in
   # preloaded symbol tables.
   extract_expsyms_cmds=
-
+  # Just being paranoid about ensuring that cc_basename is set.
+  _LT_CC_BASENAME([$compiler])
   case $host_os in
   cygwin* | mingw* | pw32*)
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
@@ -5059,6 +5260,27 @@
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
 
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    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
+
     # See if GNU ld supports shared libraries.
     case $host_os in
     aix3* | aix4* | aix5*)
@@ -5109,7 +5331,7 @@
       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
       _LT_AC_TAGVAR(always_export_symbols, $1)=no
       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+      _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'
@@ -5123,10 +5345,41 @@
 	fi~
 	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
       else
-	ld_shlibs=no
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
 
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
     netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
@@ -5165,31 +5418,6 @@
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
-  linux*)
-    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
-      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
-        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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
-        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
-      fi
-    else
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    fi
-    ;;
-
     *)
       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -5200,16 +5428,11 @@
       ;;
     esac
 
-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
-      runpath_var=LD_RUN_PATH
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-      # ancient GNU ld didn't support --whole-archive et. al.
-      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
- 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-      fi
+    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
     fi
   else
     # PORTME fill in a description of your system's linker (not GNU ld)
@@ -5273,7 +5496,7 @@
       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
       if test "$GCC" = yes; then
-	case $host_os in aix4.[012]|aix4.[012].*)
+	case $host_os in aix4.[[012]]|aix4.[[012]].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
 	  collect2name=`${CC} -print-prog-name=collect2`
@@ -5294,6 +5517,9 @@
 	  fi
 	esac
 	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
       else
 	# not using gcc
 	if test "$host_cpu" = ia64; then
@@ -5338,7 +5564,7 @@
 	  # Exported symbols can be pulled into shared objects from archives
 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-	  # This is similar to how AIX traditionally builds it's shared libraries.
+	  # 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'
 	fi
       fi
@@ -5352,7 +5578,7 @@
       _LT_AC_TAGVAR(ld_shlibs, $1)=no
       ;;
 
-    bsdi4*)
+    bsdi[[45]]*)
       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
       ;;
 
@@ -5373,57 +5599,57 @@
       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
       # FIXME: Should let the user specify the lib program.
       _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
       ;;
 
     darwin* | rhapsody*)
-    if test "$GXX" = yes ; then
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      case "$host_os" in
-      rhapsody* | darwin1.[[012]])
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
-	;;
-      *) # Darwin 1.3 on
-      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-      	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-      else
-        case ${MACOSX_DEPLOYMENT_TARGET} in
-          10.[[012]])
-            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-            ;;
-          10.*)
-            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
-            ;;
-        esac
-      fi
-	;;
+      case $host_os in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
       esac
-    	lt_int_apple_cc_single_mod=no
-    	output_verbose_link_cmd='echo'
-    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
-    	  lt_int_apple_cc_single_mod=yes
-    	fi
-    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-    	else
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      fi
-      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-        else
-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-        fi
-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_AC_TAGVAR(hardcode_direct, $1)=no
       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
     fi
       ;;
 
@@ -5457,7 +5683,7 @@
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu)
+    freebsd* | kfreebsd*-gnu | dragonfly*)
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
@@ -5482,7 +5708,7 @@
 
     hpux10* | hpux11*)
       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case "$host_cpu" in
+	case $host_cpu in
 	hppa*64*|ia64*)
 	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
@@ -5491,7 +5717,7 @@
 	  ;;
 	esac
       else
-	case "$host_cpu" in
+	case $host_cpu in
 	hppa*64*|ia64*)
 	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  ;;
@@ -5501,7 +5727,7 @@
 	esac
       fi
       if test "$with_gnu_ld" = no; then
-	case "$host_cpu" in
+	case $host_cpu in
 	hppa*64*)
 	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
@@ -5568,6 +5794,7 @@
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
       else
@@ -5613,7 +5840,7 @@
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -5632,10 +5859,12 @@
     solaris*)
       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
       if test "$GCC" = yes; then
+	wlarc='${wl}'
 	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_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~
 	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
       else
+	wlarc=''
 	_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'
@@ -5644,8 +5873,18 @@
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
       case $host_os in
       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+      *)
+ 	# The compiler driver will combine linker options so we
+ 	# cannot just pass the convience library names through
+ 	# without $wl, iff we do not link with $LD.
+ 	# Luckily, gcc supports the same syntax we need for Sun Studio.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+ 	case $wlarc in
+ 	'')
+ 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+ 	*)
+ 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ 	esac ;;
       esac
       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
       ;;
@@ -5906,7 +6145,7 @@
 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 # along with /bin/sed that truncates output.
 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && break
+  test ! -f $lt_ac_sed && continue
   cat /dev/null > conftest.in
   lt_ac_count=0
   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
@@ -5931,29 +6170,17 @@
     fi
   done
 done
-SED=$lt_cv_path_SED
 ])
+SED=$lt_cv_path_SED
 AC_MSG_RESULT([$SED])
 ])
 
-#                                                        -*- Autoconf -*-
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
-# Generated from amversion.in; do not edit by hand.
+# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
@@ -5965,27 +6192,16 @@
 # Call AM_AUTOMAKE_VERSION so it can be traced.
 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-	 [AM_AUTOMAKE_VERSION([1.9.2])])
+	 [AM_AUTOMAKE_VERSION([1.9.6])])
 
-# AM_AUX_DIR_EXPAND
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@@ -6031,27 +6247,17 @@
 am_aux_dir=`cd $ac_aux_dir && pwd`
 ])
 
-# AM_CONDITIONAL                                              -*- Autoconf -*-
+# AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 7
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 6
-
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
 # Define a conditional.
@@ -6074,27 +6280,16 @@
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# serial 7						-*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 # Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 8
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
 # will think it sees a *use*, and therefore will trigger all it's
@@ -6102,7 +6297,6 @@
 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
 
-
 # _AM_DEPENDENCIES(NAME)
 # ----------------------
 # See how the compiler implements dependency checking.
@@ -6242,28 +6436,17 @@
 AC_SUBST([AMDEPBACKSLASH])
 ])
 
-# Generate code to set up dependency tracking.   -*- Autoconf -*-
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
-#   Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+#serial 3
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-#serial 2
-
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
@@ -6321,31 +6504,20 @@
      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 ])
 
-# Do all the work for Automake.                            -*- Autoconf -*-
+# Do all the work for Automake.                             -*- Autoconf -*-
 
-# This macro actually does too much some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 # Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 12
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 11
-
 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 # AM_INIT_AUTOMAKE([OPTIONS])
 # -----------------------------------------------
@@ -6446,52 +6618,28 @@
 done
 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 install_sh=${install_sh-"$am_aux_dir/install-sh"}
 AC_SUBST(install_sh)])
 
-#                                                          -*- Autoconf -*-
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 2
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 1
-
 # Check whether the underlying file-system supports filenames
 # with a leading dot.  For instance MS-DOS doesn't.
 AC_DEFUN([AM_SET_LEADING_DOT],
@@ -6505,27 +6653,16 @@
 rmdir .tst 2>/dev/null
 AC_SUBST([am__leading_dot])])
 
-# Check to see how 'make' treats includes.	-*- Autoconf -*-
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 3
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
 # AM_MAKE_INCLUDE()
 # -----------------
 # Check to see how make treats includes.
@@ -6568,28 +6705,17 @@
 rm -f confinc confmf
 ])
 
-#  -*- Autoconf -*-
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+# serial 4
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
 AC_DEFUN([AM_MISSING_PROG],
@@ -6614,27 +6740,16 @@
 fi
 ])
 
+# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
 # AM_PROG_MKDIR_P
 # ---------------
 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
+#
 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 # created by `make install' are always world readable, even if the
 # installer happens to have an overly restrictive umask (e.g. 077).
@@ -6688,27 +6803,16 @@
 fi
 AC_SUBST([mkdir_p])])
 
-# Helper functions for option handling.                    -*- Autoconf -*-
+# Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 3
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
 AC_DEFUN([_AM_MANGLE_OPTION],
@@ -6732,29 +6836,17 @@
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
 #
-# Check to make sure that the build environment is sane.
-#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+# serial 4
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
 # AM_SANITY_CHECK
 # ---------------
 AC_DEFUN([AM_SANITY_CHECK],
@@ -6796,25 +6888,14 @@
 fi
 AC_MSG_RESULT(yes)])
 
-# AM_PROG_INSTALL_STRIP
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
+# AM_PROG_INSTALL_STRIP
+# ---------------------
 # One issue with vendor `install' (even GNU) is that you can't
 # specify the program used to strip binaries.  This is especially
 # annoying in cross-compiling environments, where the build's strip
@@ -6837,25 +6918,13 @@
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 1
-
+# serial 2
 
 # _AM_PROG_TAR(FORMAT)
 # --------------------

Modified: freeswitch/branches/mishehu/build/buildlib.sh
==============================================================================
--- freeswitch/branches/mishehu/build/buildlib.sh	(original)
+++ freeswitch/branches/mishehu/build/buildlib.sh	Sun Aug 27 11:43:21 2006
@@ -67,7 +67,7 @@
     MAKE=$MAKE ../$uncompressed.build.sh $@
 else
     $MAKE clean 2>&1
-    sh ./configure $@
+    CFLAGS="$MOD_CFLAGS" ; export CFLAGS; sh ./configure $@
 
     if [ $? = 0 ] ; then
 	$MAKE

Modified: freeswitch/branches/mishehu/build/modmake.sh
==============================================================================
--- freeswitch/branches/mishehu/build/modmake.sh	(original)
+++ freeswitch/branches/mishehu/build/modmake.sh	Sun Aug 27 11:43:21 2006
@@ -20,8 +20,8 @@
 fi
 
 if [ -f $mod/Makefile ] ; then
-    MODNAME=$end $make -C $mod $@
+    CFLAGS="$MOD_CFLAGS $CFLAGS " MODNAME=$end $make -C $mod $@
 else 
-    MODNAME=$end $make -f $pwd/generic_mod.mk -C $mod $@
+    CFLAGS="$MOD_CFLAGS $CFLAGS" MODNAME=$end $make -f $pwd/generic_mod.mk -C $mod $@
 fi
 

Modified: freeswitch/branches/mishehu/conf/freeswitch.xml
==============================================================================
--- freeswitch/branches/mishehu/conf/freeswitch.xml	(original)
+++ freeswitch/branches/mishehu/conf/freeswitch.xml	Sun Aug 27 11:43:21 2006
@@ -349,9 +349,6 @@
           <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">

Modified: freeswitch/branches/mishehu/configure
==============================================================================
--- freeswitch/branches/mishehu/configure	(original)
+++ freeswitch/branches/mishehu/configure	Sun Aug 27 11:43:21 2006
@@ -280,15 +280,15 @@
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 if test -z "$ECHO"; then
 if test "X${echo_test_string+set}" != Xset; then
 # find a string as large as possible, as long as the shell can cope with it
   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
-       echo_test_string="`eval $cmd`" &&
+    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+       echo_test_string=`eval $cmd` &&
        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
     then
       break
@@ -3358,7 +3358,7 @@
 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 # along with /bin/sed that truncates output.
 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && break
+  test ! -f $lt_ac_sed && continue
   cat /dev/null > conftest.in
   lt_ac_count=0
   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
@@ -3383,10 +3383,10 @@
     fi
   done
 done
-SED=$lt_cv_path_SED
 
 fi
 
+SED=$lt_cv_path_SED
 echo "$as_me:$LINENO: result: $SED" >&5
 echo "${ECHO_T}$SED" >&6
 
@@ -3463,7 +3463,7 @@
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
       lt_cv_path_LD="$ac_dir/$ac_prog"
       # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
+      # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
@@ -3497,7 +3497,7 @@
 if test "${lt_cv_prog_gnu_ld+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
   lt_cv_prog_gnu_ld=yes
@@ -3527,6 +3527,15 @@
 *) reload_flag=" $reload_flag" ;;
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
 
 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
@@ -3613,7 +3622,7 @@
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-bsdi4*)
+bsdi[45]*)
   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
   lt_cv_file_magic_cmd='/usr/bin/file -L'
   lt_cv_file_magic_test_file=/shlib/libc.so
@@ -3636,13 +3645,13 @@
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd* | kfreebsd*-gnu)
+freebsd* | kfreebsd*-gnu | dragonfly*)
   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
       # Not sure whether the presence of OpenBSD here was a mistake.
       # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
       lt_cv_file_magic_cmd=/usr/bin/file
       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
       ;;
@@ -3658,7 +3667,7 @@
 
 hpux10.20* | hpux11*)
   lt_cv_file_magic_cmd=/usr/bin/file
-  case "$host_cpu" in
+  case $host_cpu in
   ia64*)
     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
@@ -3686,15 +3695,6 @@
 
 # This must be Linux ELF.
 linux*)
-  case $host_cpu in
-  alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*)
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
-  esac
-  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -3717,12 +3717,10 @@
   ;;
 
 openbsd*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
   else
-    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
   fi
   ;;
 
@@ -3815,7 +3813,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 3818 "configure"' > conftest.$ac_ext
+  echo '#line 3816 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -3858,7 +3856,7 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-    case "`/usr/bin/file conftest.o`" in
+    case `/usr/bin/file conftest.o` in
     *32-bit*)
       case $host in
         x86_64-*linux*)
@@ -5064,7 +5062,12 @@
 fi
 
 
-ac_ext=cc
+
+
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -5294,7 +5297,9 @@
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
+fi
 
+
 ac_ext=f
 ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -5387,7 +5392,7 @@
 
 
 # Provide some information about the compiler.
-echo "$as_me:5390:" \
+echo "$as_me:5395:" \
      "checking for Fortran 77 compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -5577,11 +5582,38 @@
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
- *)
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    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`
+    ;;
+  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
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    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
     # we can't tell.
-    while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+    while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
 	       = "XX$teststring") >/dev/null 2>&1 &&
 	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
 	    lt_cv_sys_max_cmd_len=$new_result &&
@@ -5627,9 +5659,6 @@
 # Regexp to match symbols that can be accessed directly from C.
 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
 
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
 # Transform an extracted symbol line into a proper C declaration
 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
@@ -5651,6 +5680,13 @@
   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
   ;;
+linux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDGIRSTW]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
 irix* | nonstopux*)
   symcode='[BCDEGRST]'
   ;;
@@ -5682,8 +5718,11 @@
 # Try without a prefix undercore, then with it.
 for ac_symprfx in "" "_"; do
 
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
   # Write the raw and C identifiers.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -5845,7 +5884,7 @@
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
+Xsed='sed -e 1s/^X//'
 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
 
 # Same as above, but do not quote variable references.
@@ -5865,7 +5904,7 @@
 default_ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a `.a' archive for static linking (except M$VC,
+# All known linkers require a `.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 ltmain="$ac_aux_dir/ltmain.sh"
@@ -6150,6 +6189,17 @@
   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 fi
 
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
 # Only perform the check for file, if the check method requires it
 case $deplibs_check_method in
 file_magic*)
@@ -6175,7 +6225,7 @@
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
-	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
@@ -6237,7 +6287,7 @@
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
-	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
@@ -6336,6 +6386,20 @@
 compiler=$CC
 
 
+# save warnings/boilerplate of simple test code
+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
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+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
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
 #
 # Check for any special shared library compilation flags.
 #
@@ -6372,11 +6436,16 @@
    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
    printf "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The compiler can only warn and ignore the option if not recognized
+     # The linker can only warn and ignore the option if not recognized
      # So say no if there are warnings
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
+       $SED '/^$/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works=yes
+       fi
      else
        lt_prog_compiler_static_works=yes
      fi
@@ -6418,18 +6487,20 @@
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    # The option is referenced via a variable to avoid confusing sed.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:6424: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6493: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:6428: \$? = $ac_status" >&5
+   echo "$as_me:6497: \$? = $ac_status" >&5
    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
-     if test ! -s conftest.err; then
+     # 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
        lt_cv_prog_compiler_rtti_exceptions=yes
      fi
    fi
@@ -6506,7 +6577,7 @@
     hpux*)
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*|ia64*)
 	# +Z the default
 	;;
@@ -6532,6 +6603,16 @@
 	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
       fi
       ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic='-qnocommon'
+         lt_prog_compiler_wl='-Wl,'
+         ;;
+       esac
+       ;;
 
     mingw* | pw32* | os2*)
       # This hack is so that the source file can tell whether it is being
@@ -6543,7 +6624,7 @@
       lt_prog_compiler_wl='-Wl,'
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*|ia64*)
 	# +Z the default
 	;;
@@ -6567,12 +6648,19 @@
       ;;
 
     linux*)
-      case $CC in
+      case $cc_basename in
       icc* | ecc*)
 	lt_prog_compiler_wl='-Wl,'
 	lt_prog_compiler_pic='-KPIC'
 	lt_prog_compiler_static='-static'
         ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
       ccc*)
         lt_prog_compiler_wl='-Wl,'
         # All Alpha code is PIC.
@@ -6593,9 +6681,14 @@
       ;;
 
     solaris*)
-      lt_prog_compiler_wl='-Wl,'
       lt_prog_compiler_pic='-KPIC'
       lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
       ;;
 
     sunos4*)
@@ -6617,6 +6710,11 @@
       fi
       ;;
 
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
     uts4*)
       lt_prog_compiler_pic='-pic'
       lt_prog_compiler_static='-Bstatic'
@@ -6651,18 +6749,20 @@
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    # The option is referenced via a variable to avoid confusing sed.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:6657: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6755: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:6661: \$? = $ac_status" >&5
+   echo "$as_me:6759: \$? = $ac_status" >&5
    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
-     if test ! -s conftest.err; then
+     # 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
        lt_prog_compiler_pic_works=yes
      fi
    fi
@@ -6683,7 +6783,7 @@
 fi
 
 fi
-case "$host_os" in
+case $host_os in
   # For platforms which do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic=
@@ -6711,23 +6811,25 @@
    # Note that $ac_compile itself does not contain backslashes and begins
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:6717: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6817: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:6721: \$? = $ac_status" >&5
+   echo "$as_me:6821: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     if test ! -s out/conftest.err; then
+     $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
        lt_cv_prog_compiler_c_o=yes
      fi
    fi
-   chmod u+w .
+   chmod u+w . 2>&5
    $rm conftest*
    # SGI C++ compiler will create directory out/ii_files/ for
    # template instantiation
@@ -6803,6 +6905,16 @@
   # rely on this symbol name, it's probably fine to never include it in
   # preloaded symbol tables.
   extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
   case $host_os in
   cygwin* | mingw* | pw32*)
@@ -6823,6 +6935,27 @@
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
 
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec=
+    fi
+    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
+
     # See if GNU ld supports shared libraries.
     case $host_os in
     aix3* | aix4* | aix5*)
@@ -6873,7 +7006,7 @@
       allow_undefined_flag=unsupported
       always_export_symbols=no
       enable_shared_with_static_runtimes=yes
-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+      export_symbols_cmds='$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
         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
@@ -6891,6 +7024,37 @@
       fi
       ;;
 
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
     netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
@@ -6929,31 +7093,6 @@
       hardcode_shlibpath_var=no
       ;;
 
-  linux*)
-    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_cmds="$tmp_archive_cmds"
-      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="$tmp_archive_cmds"
-      fi
-    else
-      ld_shlibs=no
-    fi
-    ;;
-
     *)
       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -6964,16 +7103,11 @@
       ;;
     esac
 
-    if test "$ld_shlibs" = yes; then
-      runpath_var=LD_RUN_PATH
-      hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
-      export_dynamic_flag_spec='${wl}--export-dynamic'
-      # ancient GNU ld didn't support --whole-archive et. al.
-      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
- 	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-  	whole_archive_flag_spec=
-      fi
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
     fi
   else
     # PORTME fill in a description of your system's linker (not GNU ld)
@@ -7037,7 +7171,7 @@
       link_all_deplibs=yes
 
       if test "$GCC" = yes; then
-	case $host_os in aix4.012|aix4.012.*)
+	case $host_os in aix4.[012]|aix4.[012].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
 	  collect2name=`${CC} -print-prog-name=collect2`
@@ -7058,6 +7192,9 @@
 	  fi
 	esac
 	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
       else
 	# not using gcc
 	if test "$host_cpu" = ia64; then
@@ -7204,7 +7341,7 @@
 	  # Exported symbols can be pulled into shared objects from archives
 	  whole_archive_flag_spec=' '
 	  archive_cmds_need_lc=yes
-	  # This is similar to how AIX traditionally builds it's shared libraries.
+	  # This is similar to how AIX traditionally builds its shared libraries.
 	  archive_expsym_cmds="\$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'
 	fi
       fi
@@ -7218,7 +7355,7 @@
       ld_shlibs=no
       ;;
 
-    bsdi4*)
+    bsdi[45]*)
       export_dynamic_flag_spec=-rdynamic
       ;;
 
@@ -7244,52 +7381,52 @@
       ;;
 
     darwin* | rhapsody*)
-    if test "$GXX" = yes ; then
-      archive_cmds_need_lc=no
-      case "$host_os" in
-      rhapsody* | darwin1.[012])
-	allow_undefined_flag='-undefined suppress'
-	;;
-      *) # Darwin 1.3 on
-      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-      	allow_undefined_flag='-flat_namespace -undefined suppress'
-      else
-        case ${MACOSX_DEPLOYMENT_TARGET} in
-          10.[012])
-            allow_undefined_flag='-flat_namespace -undefined suppress'
-            ;;
-          10.*)
-            allow_undefined_flag='-undefined dynamic_lookup'
-            ;;
-        esac
-      fi
-	;;
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
       esac
-    	lt_int_apple_cc_single_mod=no
-    	output_verbose_link_cmd='echo'
-    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
-    	  lt_int_apple_cc_single_mod=yes
-    	fi
-    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-    	else
-        archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      fi
-      module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-        else
-          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-        fi
-          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_cmds_need_lc=no
       hardcode_direct=no
       hardcode_automatic=yes
       hardcode_shlibpath_var=unsupported
-      whole_archive_flag_spec='-all_load $convenience'
+      whole_archive_flag_spec=''
       link_all_deplibs=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
-      ld_shlibs=no
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs=no
+          ;;
+      esac
     fi
       ;;
 
@@ -7323,7 +7460,7 @@
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu)
+    freebsd* | kfreebsd*-gnu | dragonfly*)
       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
@@ -7348,7 +7485,7 @@
 
     hpux10* | hpux11*)
       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case "$host_cpu" in
+	case $host_cpu in
 	hppa*64*|ia64*)
 	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
@@ -7357,7 +7494,7 @@
 	  ;;
 	esac
       else
-	case "$host_cpu" in
+	case $host_cpu in
 	hppa*64*|ia64*)
 	  archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  ;;
@@ -7367,7 +7504,7 @@
 	esac
       fi
       if test "$with_gnu_ld" = no; then
-	case "$host_cpu" in
+	case $host_cpu in
 	hppa*64*)
 	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
 	  hardcode_libdir_flag_spec_ld='+b $libdir'
@@ -7434,6 +7571,7 @@
       hardcode_shlibpath_var=no
       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 	hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
 	export_dynamic_flag_spec='${wl}-E'
       else
@@ -7479,7 +7617,7 @@
 	allow_undefined_flag=' -expect_unresolved \*'
 	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	hardcode_libdir_flag_spec='-rpath $libdir'
@@ -7498,10 +7636,12 @@
     solaris*)
       no_undefined_flag=' -z text'
       if test "$GCC" = yes; then
+	wlarc='${wl}'
 	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
       else
+	wlarc=''
 	archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	archive_expsym_cmds='$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'
@@ -7510,8 +7650,18 @@
       hardcode_shlibpath_var=no
       case $host_os in
       solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-	whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+      *)
+ 	# The compiler driver will combine linker options so we
+ 	# cannot just pass the convience library names through
+ 	# without $wl, iff we do not link with $LD.
+ 	# Luckily, gcc supports the same syntax we need for Sun Studio.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+ 	case $wlarc in
+ 	'')
+ 	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+ 	*)
+ 	  whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ 	esac ;;
       esac
       link_all_deplibs=yes
       ;;
@@ -7785,7 +7935,7 @@
   shlibpath_var=LIBRARY_PATH
   ;;
 
-bsdi4*)
+bsdi[45]*)
   version_type=linux
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -7813,7 +7963,8 @@
       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname'
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
        $rm \$dlpath'
@@ -7843,7 +7994,7 @@
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
     ;;
@@ -7866,7 +8017,7 @@
   soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
   if test "$GCC" = yes; then
     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
@@ -7901,8 +8052,17 @@
   dynamic_linker='GNU ld.so'
   ;;
 
-freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
@@ -7920,7 +8080,7 @@
   freebsd2*)
     shlibpath_overrides_runpath=yes
     ;;
-  freebsd3.01* | freebsdelf3.01*)
+  freebsd3.[01]* | freebsdelf3.[01]*)
     shlibpath_overrides_runpath=yes
     hardcode_into_libs=yes
     ;;
@@ -7947,7 +8107,7 @@
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  case "$host_cpu" in
+  case $host_cpu in
   ia64*)
     shrext_cmds='.so'
     hardcode_into_libs=yes
@@ -8044,31 +8204,10 @@
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '#line 8051 "configure"' > conftest.$ac_ext
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
-
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -8130,7 +8269,11 @@
 openbsd*)
   version_type=sunos
   need_lib_prefix=no
-  need_version=yes
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
@@ -8252,8 +8395,8 @@
 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
 hardcode_action=
 if test -n "$hardcode_libdir_flag_spec" || \
-   test -n "$runpath_var " || \
-   test "X$hardcode_automatic"="Xyes" ; then
+   test -n "$runpath_var" || \
+   test "X$hardcode_automatic" = "Xyes" ; then
 
   # We can hardcode non-existant directories.
   if test "$hardcode_direct" != no &&
@@ -8919,7 +9062,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 8922 "configure"
+#line 9065 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -8985,7 +9128,7 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
+    (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
@@ -9017,7 +9160,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9020 "configure"
+#line 9163 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9083,7 +9226,7 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
+    (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
@@ -9133,7 +9276,7 @@
 
 # On AIX, shared libraries and static libraries use the same namespace, and
 # are all built from PIC.
-case "$host_os" in
+case $host_os in
 aix3*)
   test "$enable_shared" = yes && enable_static=no
   if test -n "$RANLIB"; then
@@ -9146,43 +9289,6 @@
   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
     test "$enable_shared" = yes && enable_static=no
   fi
-  ;;
-  darwin* | rhapsody*)
-  if test "$GCC" = yes; then
-    archive_cmds_need_lc=no
-    case "$host_os" in
-    rhapsody* | darwin1.[012])
-      allow_undefined_flag='-undefined suppress'
-      ;;
-    *) # Darwin 1.3 on
-      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-      	allow_undefined_flag='-flat_namespace -undefined suppress'
-      else
-        case ${MACOSX_DEPLOYMENT_TARGET} in
-          10.[012])
-            allow_undefined_flag='-flat_namespace -undefined suppress'
-            ;;
-          10.*)
-            allow_undefined_flag='-undefined dynamic_lookup'
-            ;;
-        esac
-      fi
-      ;;
-    esac
-    output_verbose_link_cmd='echo'
-    archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
-    module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-    archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    hardcode_direct=no
-    hardcode_automatic=yes
-    hardcode_shlibpath_var=unsupported
-    whole_archive_flag_spec='-all_load $convenience'
-    link_all_deplibs=yes
-  else
-    ld_shlibs=no
-  fi
     ;;
 esac
 echo "$as_me:$LINENO: result: $enable_shared" >&5
@@ -9312,7 +9418,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -9323,11 +9429,11 @@
 SED=$lt_SED
 
 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e s/^X//"
+Xsed="$SED -e 1s/^X//"
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 # The names of the tagged configurations supported by this script.
 available_tags=
@@ -9357,7 +9463,13 @@
 # The host system.
 host_alias=$host_alias
 host=$host
+host_os=$host_os
 
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
 # An echo program that does not interpret backslashes.
 echo=$lt_echo
 
@@ -9433,7 +9545,7 @@
 # Does compiler simultaneously support -c and -o options?
 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
 
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
 need_locks=$lt_need_locks
 
 # Do we need the lib prefix for modules?
@@ -9728,7 +9840,9 @@
 
       case $tagname in
       CXX)
-	if test -n "$CXX" && test "X$CXX" != "Xno"; then
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
 	  ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -9765,7 +9879,7 @@
 compiler_lib_search_path_CXX=
 
 # Source file extension for C++ test sources.
-ac_ext=cc
+ac_ext=cpp
 
 # Object file extension for compiled C++ test sources.
 objext=o
@@ -9786,6 +9900,20 @@
 compiler=$CC
 
 
+# save warnings/boilerplate of simple test code
+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
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+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
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
 # Allow CC to be a program name with arguments.
 lt_save_CC=$CC
 lt_save_LD=$LD
@@ -9807,8 +9935,17 @@
 CC=${CXX-"c++"}
 compiler=$CC
 compiler_CXX=$CC
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
+
 # We don't want -fno-exception wen compiling C++ code, so set the
 # no_builtin_flag separately
 if test "$GXX" = yes; then
@@ -9878,7 +10015,7 @@
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
       lt_cv_path_LD="$ac_dir/$ac_prog"
       # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
+      # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
@@ -9912,7 +10049,7 @@
 if test "${lt_cv_prog_gnu_ld+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
   lt_cv_prog_gnu_ld=yes
@@ -10021,7 +10158,7 @@
     link_all_deplibs_CXX=yes
 
     if test "$GXX" = yes; then
-      case $host_os in aix4.012|aix4.012.*)
+      case $host_os in aix4.[012]|aix4.[012].*)
       # We only want to do this on AIX 4.2 and lower, the check
       # below for broken collect2 doesn't work under 4.3+
 	collect2name=`${CC} -print-prog-name=collect2`
@@ -10042,6 +10179,9 @@
 	fi
       esac
       shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
     else
       # not using gcc
       if test "$host_cpu" = ia64; then
@@ -10189,7 +10329,7 @@
 	# Exported symbols can be pulled into shared objects from archives
 	whole_archive_flag_spec_CXX=' '
 	archive_cmds_need_lc_CXX=yes
-	# This is similar to how AIX traditionally builds it's shared libraries.
+	# This is similar to how AIX traditionally builds its shared libraries.
 	archive_expsym_cmds_CXX="\$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'
       fi
     fi
@@ -10203,6 +10343,7 @@
     esac
     ;;
 
+
   cygwin* | mingw* | pw32*)
     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
     # as there is no search path for DLLs.
@@ -10226,65 +10367,76 @@
       ld_shlibs_CXX=no
     fi
   ;;
+      darwin* | rhapsody*)
+        case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+        esac
+      archive_cmds_need_lc_CXX=no
+      hardcode_direct_CXX=no
+      hardcode_automatic_CXX=yes
+      hardcode_shlibpath_var_CXX=unsupported
+      whole_archive_flag_spec_CXX=''
+      link_all_deplibs_CXX=yes
 
-  darwin* | rhapsody*)
-  if test "$GXX" = yes; then
-    archive_cmds_need_lc_CXX=no
-    case "$host_os" in
-    rhapsody* | darwin1.[012])
-      allow_undefined_flag_CXX='-undefined suppress'
-      ;;
-    *) # Darwin 1.3 on
-      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-      	allow_undefined_flag_CXX='-flat_namespace -undefined suppress'
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
+      fi
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
       else
-        case ${MACOSX_DEPLOYMENT_TARGET} in
-          10.[012])
-            allow_undefined_flag_CXX='-flat_namespace -undefined suppress'
-            ;;
-          10.*)
-            allow_undefined_flag_CXX='-undefined dynamic_lookup'
-            ;;
-        esac
+          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        fi
+        module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          else
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          fi
+            module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_CXX=no
+          ;;
+      esac
       fi
-      ;;
-    esac
-    lt_int_apple_cc_single_mod=no
-    output_verbose_link_cmd='echo'
-    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
-      lt_int_apple_cc_single_mod=yes
-    fi
-    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-      archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-    else
-      archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-    fi
-    module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        ;;
 
-    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-      archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    fi
-    module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    hardcode_direct_CXX=no
-    hardcode_automatic_CXX=yes
-    hardcode_shlibpath_var_CXX=unsupported
-    whole_archive_flag_spec_CXX='-all_load $convenience'
-    link_all_deplibs_CXX=yes
-  else
-    ld_shlibs_CXX=no
-  fi
-    ;;
-
   dgux*)
     case $cc_basename in
-      ec++)
+      ec++*)
 	# FIXME: insert proper C++ library support
 	ld_shlibs_CXX=no
 	;;
-      ghcx)
+      ghcx*)
 	# Green Hills C++ Compiler
 	# FIXME: insert proper C++ library support
 	ld_shlibs_CXX=no
@@ -10295,14 +10447,14 @@
 	;;
     esac
     ;;
-  freebsd12*)
+  freebsd[12]*)
     # C++ shared libraries reported to be fairly broken before switch to ELF
     ld_shlibs_CXX=no
     ;;
   freebsd-elf*)
     archive_cmds_need_lc_CXX=no
     ;;
-  freebsd* | kfreebsd*-gnu)
+  freebsd* | kfreebsd*-gnu | dragonfly*)
     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
     # conventions
     ld_shlibs_CXX=yes
@@ -10319,11 +10471,11 @@
 				# location of the library.
 
     case $cc_basename in
-    CC)
+    CC*)
       # FIXME: insert proper C++ library support
       ld_shlibs_CXX=no
       ;;
-    aCC)
+    aCC*)
       archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       # Commands to make compiler produce verbose output that lists
       # what "hidden" libraries, object files and flags are used when
@@ -10333,7 +10485,7 @@
       # explicitly linking system object files so we need to strip them
       # from the output so that they don't get included in the library
       # dependencies.
-      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
       ;;
     *)
       if test "$GXX" = yes; then
@@ -10347,7 +10499,7 @@
     ;;
   hpux10*|hpux11*)
     if test $with_gnu_ld = no; then
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*)
 	hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
 	hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
@@ -10363,7 +10515,7 @@
         ;;
       esac
     fi
-    case "$host_cpu" in
+    case $host_cpu in
     hppa*64*)
       hardcode_direct_CXX=no
       hardcode_shlibpath_var_CXX=no
@@ -10384,12 +10536,12 @@
     esac
 
     case $cc_basename in
-      CC)
+      CC*)
 	# FIXME: insert proper C++ library support
 	ld_shlibs_CXX=no
 	;;
-      aCC)
-	case "$host_cpu" in
+      aCC*)
+	case $host_cpu in
 	hppa*64*|ia64*)
 	  archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 	  ;;
@@ -10410,7 +10562,7 @@
       *)
 	if test "$GXX" = yes; then
 	  if test $with_gnu_ld = no; then
-	    case "$host_cpu" in
+	    case $host_cpu in
 	    ia64*|hppa*64*)
 	      archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 	      ;;
@@ -10428,9 +10580,9 @@
     ;;
   irix5* | irix6*)
     case $cc_basename in
-      CC)
+      CC*)
 	# SGI C++
-	archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+	archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
 	# Archives containing C++ object files must be created using
 	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
@@ -10441,7 +10593,7 @@
       *)
 	if test "$GXX" = yes; then
 	  if test "$with_gnu_ld" = no; then
-	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	  else
 	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
 	  fi
@@ -10454,7 +10606,7 @@
     ;;
   linux*)
     case $cc_basename in
-      KCC)
+      KCC*)
 	# Kuck and Associates, Inc. (KAI) C++ Compiler
 
 	# KCC will only create a shared library if the output file
@@ -10479,17 +10631,41 @@
 	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
 	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
 	;;
-      icpc)
+      icpc*)
 	# Intel C++
 	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
 	archive_cmds_need_lc_CXX=no
-	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
 	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
 	whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 	;;
-      cxx)
+      pgCC*)
+        # Portland Group C++ compiler
+	archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        ;;
+      cxx*)
 	# Compaq C++
 	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 	archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
@@ -10520,7 +10696,7 @@
     ;;
   mvs*)
     case $cc_basename in
-      cxx)
+      cxx*)
 	# FIXME: insert proper C++ library support
 	ld_shlibs_CXX=no
 	;;
@@ -10541,9 +10717,25 @@
     # Workaround some broken pre-1.5 toolchains
     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
     ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    ld_shlibs_CXX=no
+    ;;
+  openbsd*)
+    hardcode_direct_CXX=yes
+    hardcode_shlibpath_var_CXX=no
+    archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+      export_dynamic_flag_spec_CXX='${wl}-E'
+      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    fi
+    output_verbose_link_cmd='echo'
+    ;;
   osf3*)
     case $cc_basename in
-      KCC)
+      KCC*)
 	# Kuck and Associates, Inc. (KAI) C++ Compiler
 
 	# KCC will only create a shared library if the output file
@@ -10559,14 +10751,14 @@
 	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
 
 	;;
-      RCC)
+      RCC*)
 	# Rational C++ 2.4.1
 	# FIXME: insert proper C++ library support
 	ld_shlibs_CXX=no
 	;;
-      cxx)
+      cxx*)
 	allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
 	hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
 	hardcode_libdir_separator_CXX=:
@@ -10584,7 +10776,7 @@
       *)
 	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-	  archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+	  archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
 	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
 	  hardcode_libdir_separator_CXX=:
@@ -10603,7 +10795,7 @@
     ;;
   osf4* | osf5*)
     case $cc_basename in
-      KCC)
+      KCC*)
 	# Kuck and Associates, Inc. (KAI) C++ Compiler
 
 	# KCC will only create a shared library if the output file
@@ -10618,17 +10810,17 @@
 	# the KAI C++ compiler.
 	old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
 	;;
-      RCC)
+      RCC*)
 	# Rational C++ 2.4.1
 	# FIXME: insert proper C++ library support
 	ld_shlibs_CXX=no
 	;;
-      cxx)
+      cxx*)
 	allow_undefined_flag_CXX=' -expect_unresolved \*'
-	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 	archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 	  echo "-hidden">> $lib.exp~
-	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
+	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
 	  $rm $lib.exp'
 
 	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
@@ -10647,7 +10839,7 @@
       *)
 	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-	 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+	 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
 	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
 	  hardcode_libdir_separator_CXX=:
@@ -10671,7 +10863,7 @@
   sco*)
     archive_cmds_need_lc_CXX=no
     case $cc_basename in
-      CC)
+      CC*)
 	# FIXME: insert proper C++ library support
 	ld_shlibs_CXX=no
 	;;
@@ -10683,12 +10875,12 @@
     ;;
   sunos4*)
     case $cc_basename in
-      CC)
+      CC*)
 	# Sun C++ 4.x
 	# FIXME: insert proper C++ library support
 	ld_shlibs_CXX=no
 	;;
-      lcc)
+      lcc*)
 	# Lucid
 	# FIXME: insert proper C++ library support
 	ld_shlibs_CXX=no
@@ -10701,36 +10893,33 @@
     ;;
   solaris*)
     case $cc_basename in
-      CC)
+      CC*)
 	# Sun C++ 4.2, 5.x and Centerline C++
+        archive_cmds_need_lc_CXX=yes
 	no_undefined_flag_CXX=' -zdefs'
-	archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
 	hardcode_libdir_flag_spec_CXX='-R$libdir'
 	hardcode_shlibpath_var_CXX=no
 	case $host_os in
-	  solaris2.0-5 | solaris2.0-5.*) ;;
+	  solaris2.[0-5] | solaris2.[0-5].*) ;;
 	  *)
 	    # The C++ compiler is used as linker so we must use $wl
 	    # flag to pass the commands to the underlying system
-	    # linker.
+	    # linker. We must also pass each convience library through
+	    # to the system linker between allextract/defaultextract.
+	    # The C++ compiler will combine linker options so we
+	    # cannot just pass the convience library names through
+	    # without $wl.
 	    # Supported since Solaris 2.6 (maybe 2.5.1?)
-	    whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
 	    ;;
 	esac
 	link_all_deplibs_CXX=yes
 
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	output_verbose_link_cmd='echo'
 
 	# Archives containing C++ object files must be created using
 	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -10738,7 +10927,7 @@
 	# in the archive.
 	old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
 	;;
-      gcx)
+      gcx*)
 	# Green Hills C++ Compiler
 	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
@@ -10781,7 +10970,7 @@
     ;;
   tandem*)
     case $cc_basename in
-      NCC)
+      NCC*)
 	# NonStop-UX NCC 3.20
 	# FIXME: insert proper C++ library support
 	ld_shlibs_CXX=no
@@ -10834,7 +11023,7 @@
   # The `*' in the case matches for architectures that use `case' in
   # $output_verbose_cmd can trigger glob expansion during the loop
   # eval without this substitution.
-  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
 
   for p in `eval $output_verbose_link_cmd`; do
     case $p in
@@ -10910,6 +11099,20 @@
 
 $rm -f confest.$objext
 
+# PORTME: override above test on systems where it is broken
+case $host_os in
+solaris*)
+  case $cc_basename in
+  CC*)
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    postdeps_CXX='-lCstd -lCrun'
+    ;;
+  esac
+esac
+
+
 case " $postdeps_CXX " in
 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
 esac
@@ -10965,7 +11168,7 @@
     hpux*)
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*|ia64*)
 	;;
       *)
@@ -10990,18 +11193,28 @@
 	;;
       chorus*)
 	case $cc_basename in
-	cxch68)
+	cxch68*)
 	  # Green Hills C++ Compiler
 	  # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
 	  ;;
 	esac
 	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case $cc_basename in
+           xlc*)
+           lt_prog_compiler_pic_CXX='-qnocommon'
+           lt_prog_compiler_wl_CXX='-Wl,'
+           ;;
+         esac
+       ;;
       dgux*)
 	case $cc_basename in
-	  ec++)
+	  ec++*)
 	    lt_prog_compiler_pic_CXX='-KPIC'
 	    ;;
-	  ghcx)
+	  ghcx*)
 	    # Green Hills C++ Compiler
 	    lt_prog_compiler_pic_CXX='-pic'
 	    ;;
@@ -11009,22 +11222,22 @@
 	    ;;
 	esac
 	;;
-      freebsd* | kfreebsd*-gnu)
+      freebsd* | kfreebsd*-gnu | dragonfly*)
 	# FreeBSD uses GNU C++
 	;;
       hpux9* | hpux10* | hpux11*)
 	case $cc_basename in
-	  CC)
+	  CC*)
 	    lt_prog_compiler_wl_CXX='-Wl,'
 	    lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 	    if test "$host_cpu" != ia64; then
 	      lt_prog_compiler_pic_CXX='+Z'
 	    fi
 	    ;;
-	  aCC)
+	  aCC*)
 	    lt_prog_compiler_wl_CXX='-Wl,'
 	    lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
-	    case "$host_cpu" in
+	    case $host_cpu in
 	    hppa*64*|ia64*)
 	      # +Z the default
 	      ;;
@@ -11039,7 +11252,7 @@
 	;;
       irix5* | irix6* | nonstopux*)
 	case $cc_basename in
-	  CC)
+	  CC*)
 	    lt_prog_compiler_wl_CXX='-Wl,'
 	    lt_prog_compiler_static_CXX='-non_shared'
 	    # CC pic flag -KPIC is the default.
@@ -11050,18 +11263,24 @@
 	;;
       linux*)
 	case $cc_basename in
-	  KCC)
+	  KCC*)
 	    # KAI C++ Compiler
 	    lt_prog_compiler_wl_CXX='--backend -Wl,'
 	    lt_prog_compiler_pic_CXX='-fPIC'
 	    ;;
-	  icpc)
+	  icpc* | ecpc*)
 	    # Intel C++
 	    lt_prog_compiler_wl_CXX='-Wl,'
 	    lt_prog_compiler_pic_CXX='-KPIC'
 	    lt_prog_compiler_static_CXX='-static'
 	    ;;
-	  cxx)
+	  pgCC*)
+	    # Portland Group C++ compiler.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  cxx*)
 	    # Compaq C++
 	    # Make sure the PIC flag is empty.  It appears that all Alpha
 	    # Linux and Compaq Tru64 Unix objects are PIC.
@@ -11078,7 +11297,7 @@
 	;;
       mvs*)
 	case $cc_basename in
-	  cxx)
+	  cxx*)
 	    lt_prog_compiler_pic_CXX='-W c,exportall'
 	    ;;
 	  *)
@@ -11089,14 +11308,14 @@
 	;;
       osf3* | osf4* | osf5*)
 	case $cc_basename in
-	  KCC)
+	  KCC*)
 	    lt_prog_compiler_wl_CXX='--backend -Wl,'
 	    ;;
-	  RCC)
+	  RCC*)
 	    # Rational C++ 2.4.1
 	    lt_prog_compiler_pic_CXX='-pic'
 	    ;;
-	  cxx)
+	  cxx*)
 	    # Digital/Compaq C++
 	    lt_prog_compiler_wl_CXX='-Wl,'
 	    # Make sure the PIC flag is empty.  It appears that all Alpha
@@ -11112,7 +11331,7 @@
 	;;
       sco*)
 	case $cc_basename in
-	  CC)
+	  CC*)
 	    lt_prog_compiler_pic_CXX='-fPIC'
 	    ;;
 	  *)
@@ -11121,13 +11340,13 @@
 	;;
       solaris*)
 	case $cc_basename in
-	  CC)
+	  CC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
 	    lt_prog_compiler_pic_CXX='-KPIC'
 	    lt_prog_compiler_static_CXX='-Bstatic'
 	    lt_prog_compiler_wl_CXX='-Qoption ld '
 	    ;;
-	  gcx)
+	  gcx*)
 	    # Green Hills C++ Compiler
 	    lt_prog_compiler_pic_CXX='-PIC'
 	    ;;
@@ -11137,12 +11356,12 @@
 	;;
       sunos4*)
 	case $cc_basename in
-	  CC)
+	  CC*)
 	    # Sun C++ 4.x
 	    lt_prog_compiler_pic_CXX='-pic'
 	    lt_prog_compiler_static_CXX='-Bstatic'
 	    ;;
-	  lcc)
+	  lcc*)
 	    # Lucid
 	    lt_prog_compiler_pic_CXX='-pic'
 	    ;;
@@ -11152,7 +11371,7 @@
 	;;
       tandem*)
 	case $cc_basename in
-	  NCC)
+	  NCC*)
 	    # NonStop-UX NCC 3.20
 	    lt_prog_compiler_pic_CXX='-KPIC'
 	    ;;
@@ -11193,18 +11412,20 @@
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    # The option is referenced via a variable to avoid confusing sed.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11199: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11418: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11203: \$? = $ac_status" >&5
+   echo "$as_me:11422: \$? = $ac_status" >&5
    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
-     if test ! -s conftest.err; then
+     # 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
        lt_prog_compiler_pic_works_CXX=yes
      fi
    fi
@@ -11225,7 +11446,7 @@
 fi
 
 fi
-case "$host_os" in
+case $host_os in
   # For platforms which do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic_CXX=
@@ -11253,23 +11474,25 @@
    # Note that $ac_compile itself does not contain backslashes and begins
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11259: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11480: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:11263: \$? = $ac_status" >&5
+   echo "$as_me:11484: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     if test ! -s out/conftest.err; then
+     $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
        lt_cv_prog_compiler_c_o_CXX=yes
      fi
    fi
-   chmod u+w .
+   chmod u+w . 2>&5
    $rm conftest*
    # SGI C++ compiler will create directory out/ii_files/ for
    # template instantiation
@@ -11324,7 +11547,7 @@
     export_symbols_cmds_CXX="$ltdll_cmds"
   ;;
   cygwin* | mingw*)
-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
   *)
     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -11504,7 +11727,7 @@
   shlibpath_var=LIBRARY_PATH
   ;;
 
-bsdi4*)
+bsdi[45]*)
   version_type=linux
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -11532,7 +11755,8 @@
       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname'
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
        $rm \$dlpath'
@@ -11562,7 +11786,7 @@
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
     ;;
@@ -11585,7 +11809,7 @@
   soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
   if test "$GCC" = yes; then
     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
@@ -11620,8 +11844,17 @@
   dynamic_linker='GNU ld.so'
   ;;
 
-freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
@@ -11639,7 +11872,7 @@
   freebsd2*)
     shlibpath_overrides_runpath=yes
     ;;
-  freebsd3.01* | freebsdelf3.01*)
+  freebsd3.[01]* | freebsdelf3.[01]*)
     shlibpath_overrides_runpath=yes
     hardcode_into_libs=yes
     ;;
@@ -11666,7 +11899,7 @@
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  case "$host_cpu" in
+  case $host_cpu in
   ia64*)
     shrext_cmds='.so'
     hardcode_into_libs=yes
@@ -11763,31 +11996,10 @@
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '#line 11770 "configure"' > conftest.$ac_ext
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
-
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -11849,7 +12061,11 @@
 openbsd*)
   version_type=sunos
   need_lib_prefix=no
-  need_version=yes
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
@@ -11971,8 +12187,8 @@
 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
 hardcode_action_CXX=
 if test -n "$hardcode_libdir_flag_spec_CXX" || \
-   test -n "$runpath_var CXX" || \
-   test "X$hardcode_automatic_CXX"="Xyes" ; then
+   test -n "$runpath_var_CXX" || \
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
 
   # We can hardcode non-existant directories.
   if test "$hardcode_direct_CXX" != no &&
@@ -12638,7 +12854,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 12641 "configure"
+#line 12857 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12704,7 +12920,7 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
+    (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
@@ -12736,7 +12952,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 12739 "configure"
+#line 12955 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12802,7 +13018,7 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
+    (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
@@ -12954,7 +13170,13 @@
 # The host system.
 host_alias=$host_alias
 host=$host
+host_os=$host_os
 
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
 # An echo program that does not interpret backslashes.
 echo=$lt_echo
 
@@ -13030,7 +13252,7 @@
 # Does compiler simultaneously support -c and -o options?
 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
 
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
 need_locks=$lt_need_locks
 
 # Do we need the lib prefix for modules?
@@ -13311,13 +13533,36 @@
 compiler=$CC
 
 
+# save warnings/boilerplate of simple test code
+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
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+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
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
 # Allow CC to be a program name with arguments.
 lt_save_CC="$CC"
 CC=${F77-"f77"}
 compiler=$CC
 compiler_F77=$CC
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
+
 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
 echo "$as_me:$LINENO: result: $can_build_shared" >&5
@@ -13329,7 +13574,7 @@
 
 # On AIX, shared libraries and static libraries use the same namespace, and
 # are all built from PIC.
-case "$host_os" in
+case $host_os in
 aix3*)
   test "$enable_shared" = yes && enable_static=no
   if test -n "$RANLIB"; then
@@ -13338,7 +13583,9 @@
   fi
   ;;
 aix4* | aix5*)
-  test "$enable_shared" = yes && enable_static=no
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
   ;;
 esac
 echo "$as_me:$LINENO: result: $enable_shared" >&5
@@ -13415,7 +13662,7 @@
     hpux*)
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*|ia64*)
 	# +Z the default
 	;;
@@ -13441,6 +13688,16 @@
 	lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
       fi
       ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic_F77='-qnocommon'
+         lt_prog_compiler_wl_F77='-Wl,'
+         ;;
+       esac
+       ;;
 
     mingw* | pw32* | os2*)
       # This hack is so that the source file can tell whether it is being
@@ -13452,7 +13709,7 @@
       lt_prog_compiler_wl_F77='-Wl,'
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*|ia64*)
 	# +Z the default
 	;;
@@ -13476,12 +13733,19 @@
       ;;
 
     linux*)
-      case $CC in
+      case $cc_basename in
       icc* | ecc*)
 	lt_prog_compiler_wl_F77='-Wl,'
 	lt_prog_compiler_pic_F77='-KPIC'
 	lt_prog_compiler_static_F77='-static'
         ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-fpic'
+	lt_prog_compiler_static_F77='-Bstatic'
+        ;;
       ccc*)
         lt_prog_compiler_wl_F77='-Wl,'
         # All Alpha code is PIC.
@@ -13502,9 +13766,14 @@
       ;;
 
     solaris*)
-      lt_prog_compiler_wl_F77='-Wl,'
       lt_prog_compiler_pic_F77='-KPIC'
       lt_prog_compiler_static_F77='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_F77='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_F77='-Wl,';;
+      esac
       ;;
 
     sunos4*)
@@ -13526,6 +13795,11 @@
       fi
       ;;
 
+    unicos*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+
     uts4*)
       lt_prog_compiler_pic_F77='-pic'
       lt_prog_compiler_static_F77='-Bstatic'
@@ -13560,18 +13834,20 @@
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    # The option is referenced via a variable to avoid confusing sed.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13566: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13840: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13570: \$? = $ac_status" >&5
+   echo "$as_me:13844: \$? = $ac_status" >&5
    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
-     if test ! -s conftest.err; then
+     # 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
        lt_prog_compiler_pic_works_F77=yes
      fi
    fi
@@ -13592,7 +13868,7 @@
 fi
 
 fi
-case "$host_os" in
+case $host_os in
   # For platforms which do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic_F77=
@@ -13620,23 +13896,25 @@
    # Note that $ac_compile itself does not contain backslashes and begins
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13626: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13902: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13630: \$? = $ac_status" >&5
+   echo "$as_me:13906: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     if test ! -s out/conftest.err; then
+     $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
        lt_cv_prog_compiler_c_o_F77=yes
      fi
    fi
-   chmod u+w .
+   chmod u+w . 2>&5
    $rm conftest*
    # SGI C++ compiler will create directory out/ii_files/ for
    # template instantiation
@@ -13712,6 +13990,16 @@
   # rely on this symbol name, it's probably fine to never include it in
   # preloaded symbol tables.
   extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
   case $host_os in
   cygwin* | mingw* | pw32*)
@@ -13732,6 +14020,27 @@
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
 
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_F77='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec_F77=
+    fi
+    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
+
     # See if GNU ld supports shared libraries.
     case $host_os in
     aix3* | aix4* | aix5*)
@@ -13782,7 +14091,7 @@
       allow_undefined_flag_F77=unsupported
       always_export_symbols_F77=no
       enable_shared_with_static_runtimes_F77=yes
-      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+      export_symbols_cmds_F77='$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
         archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
@@ -13796,10 +14105,41 @@
 	fi~
 	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
       else
-	ld_shlibs=no
+	ld_shlibs_F77=no
       fi
       ;;
 
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  archive_expsym_cmds_F77='$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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
     netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
@@ -13838,31 +14178,6 @@
       hardcode_shlibpath_var_F77=no
       ;;
 
-  linux*)
-    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_cmds_F77="$tmp_archive_cmds"
-      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_F77='$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_F77="$tmp_archive_cmds"
-      fi
-    else
-      ld_shlibs_F77=no
-    fi
-    ;;
-
     *)
       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -13873,16 +14188,11 @@
       ;;
     esac
 
-    if test "$ld_shlibs_F77" = yes; then
-      runpath_var=LD_RUN_PATH
-      hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
-      export_dynamic_flag_spec_F77='${wl}--export-dynamic'
-      # ancient GNU ld didn't support --whole-archive et. al.
-      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
- 	whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-  	whole_archive_flag_spec_F77=
-      fi
+    if test "$ld_shlibs_F77" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_F77=
+      export_dynamic_flag_spec_F77=
+      whole_archive_flag_spec_F77=
     fi
   else
     # PORTME fill in a description of your system's linker (not GNU ld)
@@ -13946,7 +14256,7 @@
       link_all_deplibs_F77=yes
 
       if test "$GCC" = yes; then
-	case $host_os in aix4.012|aix4.012.*)
+	case $host_os in aix4.[012]|aix4.[012].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
 	  collect2name=`${CC} -print-prog-name=collect2`
@@ -13967,6 +14277,9 @@
 	  fi
 	esac
 	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
       else
 	# not using gcc
 	if test "$host_cpu" = ia64; then
@@ -14093,7 +14406,7 @@
 	  # Exported symbols can be pulled into shared objects from archives
 	  whole_archive_flag_spec_F77=' '
 	  archive_cmds_need_lc_F77=yes
-	  # This is similar to how AIX traditionally builds it's shared libraries.
+	  # This is similar to how AIX traditionally builds its shared libraries.
 	  archive_expsym_cmds_F77="\$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'
 	fi
       fi
@@ -14107,7 +14420,7 @@
       ld_shlibs_F77=no
       ;;
 
-    bsdi4*)
+    bsdi[45]*)
       export_dynamic_flag_spec_F77=-rdynamic
       ;;
 
@@ -14128,57 +14441,57 @@
       old_archive_From_new_cmds_F77='true'
       # FIXME: Should let the user specify the lib program.
       old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
       enable_shared_with_static_runtimes_F77=yes
       ;;
 
     darwin* | rhapsody*)
-    if test "$GXX" = yes ; then
-      archive_cmds_need_lc_F77=no
-      case "$host_os" in
-      rhapsody* | darwin1.[012])
-	allow_undefined_flag_F77='-undefined suppress'
-	;;
-      *) # Darwin 1.3 on
-      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-      	allow_undefined_flag_F77='-flat_namespace -undefined suppress'
-      else
-        case ${MACOSX_DEPLOYMENT_TARGET} in
-          10.[012])
-            allow_undefined_flag_F77='-flat_namespace -undefined suppress'
-            ;;
-          10.*)
-            allow_undefined_flag_F77='-undefined dynamic_lookup'
-            ;;
-        esac
-      fi
-	;;
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
       esac
-    	lt_int_apple_cc_single_mod=no
-    	output_verbose_link_cmd='echo'
-    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
-    	  lt_int_apple_cc_single_mod=yes
-    	fi
-    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-    	else
-        archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      fi
-      module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-        else
-          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-        fi
-          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_cmds_need_lc_F77=no
       hardcode_direct_F77=no
       hardcode_automatic_F77=yes
       hardcode_shlibpath_var_F77=unsupported
-      whole_archive_flag_spec_F77='-all_load $convenience'
+      whole_archive_flag_spec_F77=''
       link_all_deplibs_F77=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
-      ld_shlibs_F77=no
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_F77=no
+          ;;
+      esac
     fi
       ;;
 
@@ -14212,7 +14525,7 @@
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu)
+    freebsd* | kfreebsd*-gnu | dragonfly*)
       archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec_F77='-R$libdir'
       hardcode_direct_F77=yes
@@ -14237,7 +14550,7 @@
 
     hpux10* | hpux11*)
       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case "$host_cpu" in
+	case $host_cpu in
 	hppa*64*|ia64*)
 	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
@@ -14246,7 +14559,7 @@
 	  ;;
 	esac
       else
-	case "$host_cpu" in
+	case $host_cpu in
 	hppa*64*|ia64*)
 	  archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  ;;
@@ -14256,7 +14569,7 @@
 	esac
       fi
       if test "$with_gnu_ld" = no; then
-	case "$host_cpu" in
+	case $host_cpu in
 	hppa*64*)
 	  hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
 	  hardcode_libdir_flag_spec_ld_F77='+b $libdir'
@@ -14323,6 +14636,7 @@
       hardcode_shlibpath_var_F77=no
       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 	archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 	hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
 	export_dynamic_flag_spec_F77='${wl}-E'
       else
@@ -14368,7 +14682,7 @@
 	allow_undefined_flag_F77=' -expect_unresolved \*'
 	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 	archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	hardcode_libdir_flag_spec_F77='-rpath $libdir'
@@ -14387,10 +14701,12 @@
     solaris*)
       no_undefined_flag_F77=' -z text'
       if test "$GCC" = yes; then
+	wlarc='${wl}'
 	archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
       else
+	wlarc=''
 	archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	archive_expsym_cmds_F77='$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'
@@ -14399,8 +14715,18 @@
       hardcode_shlibpath_var_F77=no
       case $host_os in
       solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-	whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
+      *)
+ 	# The compiler driver will combine linker options so we
+ 	# cannot just pass the convience library names through
+ 	# without $wl, iff we do not link with $LD.
+ 	# Luckily, gcc supports the same syntax we need for Sun Studio.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+ 	case $wlarc in
+ 	'')
+ 	  whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
+ 	*)
+ 	  whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ 	esac ;;
       esac
       link_all_deplibs_F77=yes
       ;;
@@ -14674,7 +15000,7 @@
   shlibpath_var=LIBRARY_PATH
   ;;
 
-bsdi4*)
+bsdi[45]*)
   version_type=linux
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -14702,7 +15028,8 @@
       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname'
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
        $rm \$dlpath'
@@ -14732,7 +15059,7 @@
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
     ;;
@@ -14755,7 +15082,7 @@
   soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
   if test "$GCC" = yes; then
     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
@@ -14790,8 +15117,17 @@
   dynamic_linker='GNU ld.so'
   ;;
 
-freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
@@ -14809,7 +15145,7 @@
   freebsd2*)
     shlibpath_overrides_runpath=yes
     ;;
-  freebsd3.01* | freebsdelf3.01*)
+  freebsd3.[01]* | freebsdelf3.[01]*)
     shlibpath_overrides_runpath=yes
     hardcode_into_libs=yes
     ;;
@@ -14836,7 +15172,7 @@
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  case "$host_cpu" in
+  case $host_cpu in
   ia64*)
     shrext_cmds='.so'
     hardcode_into_libs=yes
@@ -14933,31 +15269,10 @@
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '#line 14940 "configure"' > conftest.$ac_ext
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
-
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -15019,7 +15334,11 @@
 openbsd*)
   version_type=sunos
   need_lib_prefix=no
-  need_version=yes
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
@@ -15141,8 +15460,8 @@
 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
 hardcode_action_F77=
 if test -n "$hardcode_libdir_flag_spec_F77" || \
-   test -n "$runpath_var F77" || \
-   test "X$hardcode_automatic_F77"="Xyes" ; then
+   test -n "$runpath_var_F77" || \
+   test "X$hardcode_automatic_F77" = "Xyes" ; then
 
   # We can hardcode non-existant directories.
   if test "$hardcode_direct_F77" != no &&
@@ -15319,7 +15638,13 @@
 # The host system.
 host_alias=$host_alias
 host=$host
+host_os=$host_os
 
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
 # An echo program that does not interpret backslashes.
 echo=$lt_echo
 
@@ -15395,7 +15720,7 @@
 # Does compiler simultaneously support -c and -o options?
 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
 
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
 need_locks=$lt_need_locks
 
 # Do we need the lib prefix for modules?
@@ -15633,7 +15958,7 @@
 lt_simple_compile_test_code="class foo {}\n"
 
 # Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n'
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
 
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
@@ -15644,16 +15969,42 @@
 compiler=$CC
 
 
+# save warnings/boilerplate of simple test code
+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
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+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
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
 # Allow CC to be a program name with arguments.
 lt_save_CC="$CC"
 CC=${GCJ-"gcj"}
 compiler=$CC
 compiler_GCJ=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
+
 # GCJ did not exist at the time GCC didn't implicitly link libc in.
 archive_cmds_need_lc_GCJ=no
 
+old_archive_cmds_GCJ=$old_archive_cmds
 
+
 lt_prog_compiler_no_builtin_flag_GCJ=
 
 if test "$GCC" = yes; then
@@ -15675,18 +16026,20 @@
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    # The option is referenced via a variable to avoid confusing sed.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15681: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16032: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15685: \$? = $ac_status" >&5
+   echo "$as_me:16036: \$? = $ac_status" >&5
    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
-     if test ! -s conftest.err; then
+     # 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
        lt_cv_prog_compiler_rtti_exceptions=yes
      fi
    fi
@@ -15763,7 +16116,7 @@
     hpux*)
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*|ia64*)
 	# +Z the default
 	;;
@@ -15789,6 +16142,16 @@
 	lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
       fi
       ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic_GCJ='-qnocommon'
+         lt_prog_compiler_wl_GCJ='-Wl,'
+         ;;
+       esac
+       ;;
 
     mingw* | pw32* | os2*)
       # This hack is so that the source file can tell whether it is being
@@ -15800,7 +16163,7 @@
       lt_prog_compiler_wl_GCJ='-Wl,'
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*|ia64*)
 	# +Z the default
 	;;
@@ -15824,12 +16187,19 @@
       ;;
 
     linux*)
-      case $CC in
+      case $cc_basename in
       icc* | ecc*)
 	lt_prog_compiler_wl_GCJ='-Wl,'
 	lt_prog_compiler_pic_GCJ='-KPIC'
 	lt_prog_compiler_static_GCJ='-static'
         ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_GCJ='-Wl,'
+	lt_prog_compiler_pic_GCJ='-fpic'
+	lt_prog_compiler_static_GCJ='-Bstatic'
+        ;;
       ccc*)
         lt_prog_compiler_wl_GCJ='-Wl,'
         # All Alpha code is PIC.
@@ -15850,9 +16220,14 @@
       ;;
 
     solaris*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
       lt_prog_compiler_pic_GCJ='-KPIC'
       lt_prog_compiler_static_GCJ='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_GCJ='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_GCJ='-Wl,';;
+      esac
       ;;
 
     sunos4*)
@@ -15874,6 +16249,11 @@
       fi
       ;;
 
+    unicos*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+
     uts4*)
       lt_prog_compiler_pic_GCJ='-pic'
       lt_prog_compiler_static_GCJ='-Bstatic'
@@ -15908,18 +16288,20 @@
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    # The option is referenced via a variable to avoid confusing sed.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15914: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16294: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15918: \$? = $ac_status" >&5
+   echo "$as_me:16298: \$? = $ac_status" >&5
    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
-     if test ! -s conftest.err; then
+     # 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
        lt_prog_compiler_pic_works_GCJ=yes
      fi
    fi
@@ -15940,7 +16322,7 @@
 fi
 
 fi
-case "$host_os" in
+case $host_os in
   # For platforms which do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic_GCJ=
@@ -15968,23 +16350,25 @@
    # Note that $ac_compile itself does not contain backslashes and begins
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15974: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16356: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:15978: \$? = $ac_status" >&5
+   echo "$as_me:16360: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     if test ! -s out/conftest.err; then
+     $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
        lt_cv_prog_compiler_c_o_GCJ=yes
      fi
    fi
-   chmod u+w .
+   chmod u+w . 2>&5
    $rm conftest*
    # SGI C++ compiler will create directory out/ii_files/ for
    # template instantiation
@@ -16060,6 +16444,16 @@
   # rely on this symbol name, it's probably fine to never include it in
   # preloaded symbol tables.
   extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
   case $host_os in
   cygwin* | mingw* | pw32*)
@@ -16080,6 +16474,27 @@
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
 
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec_GCJ=
+    fi
+    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
+
     # See if GNU ld supports shared libraries.
     case $host_os in
     aix3* | aix4* | aix5*)
@@ -16130,7 +16545,7 @@
       allow_undefined_flag_GCJ=unsupported
       always_export_symbols_GCJ=no
       enable_shared_with_static_runtimes_GCJ=yes
-      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+      export_symbols_cmds_GCJ='$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
         archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
@@ -16144,10 +16559,41 @@
 	fi~
 	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
       else
-	ld_shlibs=no
+	ld_shlibs_GCJ=no
       fi
       ;;
 
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  archive_expsym_cmds_GCJ='$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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
     netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 	archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
@@ -16186,31 +16632,6 @@
       hardcode_shlibpath_var_GCJ=no
       ;;
 
-  linux*)
-    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_cmds_GCJ="$tmp_archive_cmds"
-      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_GCJ='$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_GCJ="$tmp_archive_cmds"
-      fi
-    else
-      ld_shlibs_GCJ=no
-    fi
-    ;;
-
     *)
       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -16221,16 +16642,11 @@
       ;;
     esac
 
-    if test "$ld_shlibs_GCJ" = yes; then
-      runpath_var=LD_RUN_PATH
-      hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
-      export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
-      # ancient GNU ld didn't support --whole-archive et. al.
-      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
- 	whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-  	whole_archive_flag_spec_GCJ=
-      fi
+    if test "$ld_shlibs_GCJ" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_GCJ=
+      export_dynamic_flag_spec_GCJ=
+      whole_archive_flag_spec_GCJ=
     fi
   else
     # PORTME fill in a description of your system's linker (not GNU ld)
@@ -16294,7 +16710,7 @@
       link_all_deplibs_GCJ=yes
 
       if test "$GCC" = yes; then
-	case $host_os in aix4.012|aix4.012.*)
+	case $host_os in aix4.[012]|aix4.[012].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
 	  collect2name=`${CC} -print-prog-name=collect2`
@@ -16315,6 +16731,9 @@
 	  fi
 	esac
 	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
       else
 	# not using gcc
 	if test "$host_cpu" = ia64; then
@@ -16461,7 +16880,7 @@
 	  # Exported symbols can be pulled into shared objects from archives
 	  whole_archive_flag_spec_GCJ=' '
 	  archive_cmds_need_lc_GCJ=yes
-	  # This is similar to how AIX traditionally builds it's shared libraries.
+	  # This is similar to how AIX traditionally builds its shared libraries.
 	  archive_expsym_cmds_GCJ="\$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'
 	fi
       fi
@@ -16475,7 +16894,7 @@
       ld_shlibs_GCJ=no
       ;;
 
-    bsdi4*)
+    bsdi[45]*)
       export_dynamic_flag_spec_GCJ=-rdynamic
       ;;
 
@@ -16496,57 +16915,57 @@
       old_archive_From_new_cmds_GCJ='true'
       # FIXME: Should let the user specify the lib program.
       old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
       enable_shared_with_static_runtimes_GCJ=yes
       ;;
 
     darwin* | rhapsody*)
-    if test "$GXX" = yes ; then
-      archive_cmds_need_lc_GCJ=no
-      case "$host_os" in
-      rhapsody* | darwin1.[012])
-	allow_undefined_flag_GCJ='-undefined suppress'
-	;;
-      *) # Darwin 1.3 on
-      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-      	allow_undefined_flag_GCJ='-flat_namespace -undefined suppress'
-      else
-        case ${MACOSX_DEPLOYMENT_TARGET} in
-          10.[012])
-            allow_undefined_flag_GCJ='-flat_namespace -undefined suppress'
-            ;;
-          10.*)
-            allow_undefined_flag_GCJ='-undefined dynamic_lookup'
-            ;;
-        esac
-      fi
-	;;
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
       esac
-    	lt_int_apple_cc_single_mod=no
-    	output_verbose_link_cmd='echo'
-    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
-    	  lt_int_apple_cc_single_mod=yes
-    	fi
-    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-    	else
-        archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      fi
-      module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-        else
-          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-        fi
-          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_cmds_need_lc_GCJ=no
       hardcode_direct_GCJ=no
       hardcode_automatic_GCJ=yes
       hardcode_shlibpath_var_GCJ=unsupported
-      whole_archive_flag_spec_GCJ='-all_load $convenience'
+      whole_archive_flag_spec_GCJ=''
       link_all_deplibs_GCJ=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
-      ld_shlibs_GCJ=no
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_GCJ=no
+          ;;
+      esac
     fi
       ;;
 
@@ -16580,7 +16999,7 @@
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu)
+    freebsd* | kfreebsd*-gnu | dragonfly*)
       archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec_GCJ='-R$libdir'
       hardcode_direct_GCJ=yes
@@ -16605,7 +17024,7 @@
 
     hpux10* | hpux11*)
       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case "$host_cpu" in
+	case $host_cpu in
 	hppa*64*|ia64*)
 	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
@@ -16614,7 +17033,7 @@
 	  ;;
 	esac
       else
-	case "$host_cpu" in
+	case $host_cpu in
 	hppa*64*|ia64*)
 	  archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  ;;
@@ -16624,7 +17043,7 @@
 	esac
       fi
       if test "$with_gnu_ld" = no; then
-	case "$host_cpu" in
+	case $host_cpu in
 	hppa*64*)
 	  hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
 	  hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
@@ -16691,6 +17110,7 @@
       hardcode_shlibpath_var_GCJ=no
       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 	archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 	hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
 	export_dynamic_flag_spec_GCJ='${wl}-E'
       else
@@ -16736,7 +17156,7 @@
 	allow_undefined_flag_GCJ=' -expect_unresolved \*'
 	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 	archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
@@ -16755,10 +17175,12 @@
     solaris*)
       no_undefined_flag_GCJ=' -z text'
       if test "$GCC" = yes; then
+	wlarc='${wl}'
 	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
       else
+	wlarc=''
 	archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	archive_expsym_cmds_GCJ='$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'
@@ -16767,8 +17189,18 @@
       hardcode_shlibpath_var_GCJ=no
       case $host_os in
       solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-	whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+      *)
+ 	# The compiler driver will combine linker options so we
+ 	# cannot just pass the convience library names through
+ 	# without $wl, iff we do not link with $LD.
+ 	# Luckily, gcc supports the same syntax we need for Sun Studio.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+ 	case $wlarc in
+ 	'')
+ 	  whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+ 	*)
+ 	  whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ 	esac ;;
       esac
       link_all_deplibs_GCJ=yes
       ;;
@@ -17042,7 +17474,7 @@
   shlibpath_var=LIBRARY_PATH
   ;;
 
-bsdi4*)
+bsdi[45]*)
   version_type=linux
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -17070,7 +17502,8 @@
       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname'
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
        $rm \$dlpath'
@@ -17100,7 +17533,7 @@
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
     ;;
@@ -17123,7 +17556,7 @@
   soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
   if test "$GCC" = yes; then
     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
@@ -17158,8 +17591,17 @@
   dynamic_linker='GNU ld.so'
   ;;
 
-freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
@@ -17177,7 +17619,7 @@
   freebsd2*)
     shlibpath_overrides_runpath=yes
     ;;
-  freebsd3.01* | freebsdelf3.01*)
+  freebsd3.[01]* | freebsdelf3.[01]*)
     shlibpath_overrides_runpath=yes
     hardcode_into_libs=yes
     ;;
@@ -17204,7 +17646,7 @@
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  case "$host_cpu" in
+  case $host_cpu in
   ia64*)
     shrext_cmds='.so'
     hardcode_into_libs=yes
@@ -17301,31 +17743,10 @@
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '#line 17308 "configure"' > conftest.$ac_ext
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
-
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -17387,7 +17808,11 @@
 openbsd*)
   version_type=sunos
   need_lib_prefix=no
-  need_version=yes
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
@@ -17509,8 +17934,8 @@
 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
 hardcode_action_GCJ=
 if test -n "$hardcode_libdir_flag_spec_GCJ" || \
-   test -n "$runpath_var GCJ" || \
-   test "X$hardcode_automatic_GCJ"="Xyes" ; then
+   test -n "$runpath_var_GCJ" || \
+   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
 
   # We can hardcode non-existant directories.
   if test "$hardcode_direct_GCJ" != no &&
@@ -18176,7 +18601,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 18179 "configure"
+#line 18604 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18242,7 +18667,7 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
+    (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
@@ -18274,7 +18699,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 18277 "configure"
+#line 18702 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18340,7 +18765,7 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
+    (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
@@ -18492,7 +18917,13 @@
 # The host system.
 host_alias=$host_alias
 host=$host
+host_os=$host_os
 
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
 # An echo program that does not interpret backslashes.
 echo=$lt_echo
 
@@ -18568,7 +18999,7 @@
 # Does compiler simultaneously support -c and -o options?
 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
 
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
 need_locks=$lt_need_locks
 
 # Do we need the lib prefix for modules?
@@ -18816,11 +19247,35 @@
 compiler=$CC
 
 
+# save warnings/boilerplate of simple test code
+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
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+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
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
 # Allow CC to be a program name with arguments.
 lt_save_CC="$CC"
 CC=${RC-"windres"}
 compiler=$CC
 compiler_RC=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
 lt_cv_prog_compiler_c_o_RC=yes
 
 # The else clause should only fire when bootstrapping the
@@ -18937,7 +19392,13 @@
 # The host system.
 host_alias=$host_alias
 host=$host
+host_os=$host_os
 
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
 # An echo program that does not interpret backslashes.
 echo=$lt_echo
 
@@ -19013,7 +19474,7 @@
 # Does compiler simultaneously support -c and -o options?
 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
 
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
 need_locks=$lt_need_locks
 
 # Do we need the lib prefix for modules?

Modified: freeswitch/branches/mishehu/libs/codec/gsm/libgsm.vcproj
==============================================================================
--- freeswitch/branches/mishehu/libs/codec/gsm/libgsm.vcproj	(original)
+++ freeswitch/branches/mishehu/libs/codec/gsm/libgsm.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,7 +17,7 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
 			CharacterSet="1"
@@ -48,7 +48,7 @@
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -80,7 +80,7 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
 			CharacterSet="1"

Modified: freeswitch/branches/mishehu/libs/codec/ilbc/libilbc.vcproj
==============================================================================
--- freeswitch/branches/mishehu/libs/codec/ilbc/libilbc.vcproj	(original)
+++ freeswitch/branches/mishehu/libs/codec/ilbc/libilbc.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,7 +17,7 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
 			CharacterSet="1"
@@ -47,7 +47,7 @@
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -79,7 +79,7 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
 			CharacterSet="1"

Modified: freeswitch/branches/mishehu/libs/iax/libiax2.vcproj
==============================================================================
--- freeswitch/branches/mishehu/libs/iax/libiax2.vcproj	(original)
+++ freeswitch/branches/mishehu/libs/iax/libiax2.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,7 +17,7 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
 			CharacterSet="1"
@@ -48,7 +48,7 @@
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -80,7 +80,7 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
 			CharacterSet="1"

Modified: freeswitch/branches/mishehu/libs/libdingaling/libdingaling.vcproj
==============================================================================
--- freeswitch/branches/mishehu/libs/libdingaling/libdingaling.vcproj	(original)
+++ freeswitch/branches/mishehu/libs/libdingaling/libdingaling.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,7 +17,7 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
 			CharacterSet="1"
@@ -40,7 +40,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories=".;.\src;..\iksemel\include;..\include;..\apr\include"
+				AdditionalIncludeDirectories=".;.\src;..\iksemel\include;..\include;..\apr\include;&quot;..\iksemel-1.2\include&quot;"
 				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -48,7 +48,7 @@
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -80,7 +80,7 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
 			CharacterSet="1"
@@ -103,7 +103,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories=".;.\src;..\iksemel\include;..\include;..\apr\include"
+				AdditionalIncludeDirectories=".;.\src;..\iksemel\include;..\include;..\apr\include;&quot;..\iksemel-1.2\include&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 		</Configuration>
 		<Configuration
 			Name="Debug DLL|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			OutputDirectory="$(SolutionDir)Debug"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			CharacterSet="1"
@@ -164,7 +164,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories=".;.\src;..\iksemel\include;..\include;..\apr\include"
+				AdditionalIncludeDirectories=".;.\src;..\iksemel\include;..\include;..\apr\include;&quot;..\iksemel-1.2\include&quot;"
 				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;APR_DECLARE_STATIC;APU_DECLARE_STATIC"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -220,7 +220,7 @@
 		</Configuration>
 		<Configuration
 			Name="Release DLL|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			OutputDirectory="$(SolutionDir)Release"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			CharacterSet="1"
@@ -243,7 +243,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories=".;.\src;..\iksemel\include;..\include;..\apr\include"
+				AdditionalIncludeDirectories=".;.\src;..\iksemel\include;..\include;..\apr\include;&quot;..\iksemel-1.2\include&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;APR_DECLARE_STATIC;APU_DECLARE_STATIC"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"

Modified: freeswitch/branches/mishehu/libs/libdingaling/src/dingaling.def
==============================================================================
--- freeswitch/branches/mishehu/libs/libdingaling/src/dingaling.def	(original)
+++ freeswitch/branches/mishehu/libs/libdingaling/src/dingaling.def	Sun Aug 27 11:43:21 2006
@@ -26,3 +26,5 @@
 ldl_handle_send_msg
 ldl_session_get_value
 ldl_session_set_value
+ldl_session_accept_candidate
+ldl_session_send_msg
\ No newline at end of file

Modified: freeswitch/branches/mishehu/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/branches/mishehu/libs/libdingaling/src/libdingaling.c	(original)
+++ freeswitch/branches/mishehu/libs/libdingaling/src/libdingaling.c	Sun Aug 27 11:43:21 2006
@@ -107,6 +107,7 @@
 	apr_hash_t *sessions;
 	apr_hash_t *retry_hash;
 	apr_hash_t *probe_hash;
+	apr_hash_t *sub_hash;
 	apr_thread_mutex_t *lock;
 	apr_thread_mutex_t *flag_mutex;
 	ldl_loop_callback_t loop_callback;
@@ -190,22 +191,31 @@
 	return session->id;
 }
 
+void ldl_session_send_msg(ldl_session_t *session, char *subject, char *body)
+{
+	ldl_handle_send_msg(session->handle, session->them, subject, body);
+}
+
 ldl_status ldl_session_destroy(ldl_session_t **session_p)
 {
 	ldl_session_t *session = *session_p;
 
 	if (session) {
 		apr_pool_t *pool = session->pool;
+		apr_hash_t *hash = session->handle->sessions;
 
 		if (globals.debug) {
 			globals.logger(DL_LOG_DEBUG, "Destroyed Session %s\n", session->id);
 		}
+
 		if (session->id) {
-			apr_hash_set(session->handle->sessions, session->id, APR_HASH_KEY_STRING, NULL);
+			apr_hash_set(hash, session->id, APR_HASH_KEY_STRING, NULL);
 		}
+
 		if (session->them) {
-			apr_hash_set(session->handle->sessions, session->them, APR_HASH_KEY_STRING, NULL);
+			apr_hash_set(hash, session->them, APR_HASH_KEY_STRING, NULL);
 		}
+
 		apr_pool_destroy(pool);
 		pool = NULL;
 		*session_p = NULL;
@@ -277,7 +287,7 @@
 	while(xml) {
 		char *type = xtype ? xtype : iks_find_attrib(xml, "type");
 		iks *tag;
-
+		
 		if (type) {
 			
 			if (!strcasecmp(type, "initiate") || !strcasecmp(type, "accept")) {
@@ -298,7 +308,7 @@
 							if (!strcasecmp(iks_name(itag), "payload-type") && session->payload_len < LDL_MAX_PAYLOADS) {
 								char *name = iks_find_attrib(itag, "name");
 								char *id = iks_find_attrib(itag, "id");
-								char *rate = iks_find_attrib(itag, "rate");
+								char *rate = iks_find_attrib(itag, "clockrate");
 								if (name && id) {
 									session->payloads[session->payload_len].name = apr_pstrdup(session->pool, name);
 									session->payloads[session->payload_len].id = atoi(id);
@@ -317,10 +327,17 @@
 					}
 					tag = iks_next_tag(tag);
 				}
-			} else if (!strcasecmp(type, "candidates")) {
+			} else if (!strcasecmp(type, "transport-accept")) {
+				signal = LDL_SIGNAL_TRANSPORT_ACCEPT;
+			} else if (!strcasecmp(type, "transport-info")) {
+				char *tid = iks_find_attrib(xml, "id");
 				signal = LDL_SIGNAL_CANDIDATES;
 				tag = iks_child (xml);
 				
+				if (tag && !strcasecmp(iks_name(tag), "transport")) {
+					tag = iks_child(tag);
+				}
+				
 				while(tag) {
 					if (!strcasecmp(iks_name(tag), "info_element")) {
 						char *name = iks_find_attrib(tag, "name");
@@ -354,6 +371,11 @@
 						}
 						
 						session->candidates[index].pref = pref;
+
+						if (tid) {
+							session->candidates[index].tid = apr_pstrdup(session->pool, tid);
+						}
+
 						if ((key = iks_find_attrib(tag, "name"))) {
 							session->candidates[index].name = apr_pstrdup(session->pool, key);
 						}
@@ -417,6 +439,7 @@
 	return LDL_STATUS_SUCCESS;
 }
 
+const char *marker = "TRUE";
 
 static int on_presence(void *user_data, ikspak *pak)
 {
@@ -426,11 +449,14 @@
 	char *resource;
 	struct ldl_buffer *buffer;
 	size_t x;
+	
+	if (!apr_hash_get(handle->sub_hash, from, APR_HASH_KEY_STRING)) {
+		iks *msg;
+		apr_hash_set(handle->sub_hash, 	apr_pstrdup(handle->pool, from), APR_HASH_KEY_STRING, &marker);
+		msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, from, "Ding A Ling...."); 
+		apr_queue_push(handle->queue, msg);
+	}
 
-	iks *msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, from, "Ding A Ling...."); 
-	apr_queue_push(handle->queue, msg);
-
-
 	apr_cpystrn(id, from, sizeof(id));
 	if ((resource = strchr(id, '/'))) {
 		*resource++ = '\0';
@@ -486,6 +512,8 @@
 	char *iqid = iks_find_attrib(pak->x, "id");
 	char *type = iks_find_attrib(pak->x, "type");
 	uint8_t is_result = strcasecmp(type, "result") ? 0 : 1;
+	uint8_t is_error = strcasecmp(type, "error") ? 0 : 1;
+
 	iks *xml;
 
 	if (is_result) {
@@ -494,59 +522,38 @@
 			if (!strcasecmp(iks_name(tag), "bind")) {
 				char *jid = iks_find_cdata(tag, "jid");
 				char *resource = strchr(jid, '/');
-				iks *iq, *usersetting, *x;
+				iks *iq, *x;
 				handle->acc->resource = apr_pstrdup(handle->pool, resource);
 				handle->login = apr_pstrdup(handle->pool, jid);
 				if ((iq = iks_new("iq"))) {
-					char *njid = strdup(handle->login);
-					if ((resource = strchr(njid, '/'))) {
-						*resource++ = '\0';
-					}
-					iks_insert_attrib(iq, "type", "set");
-					iks_insert_attrib(iq, "to", njid);
-					iks_insert_attrib(iq, "id", "params");
-
-					usersetting = iks_insert(iq, "usersetting");
-					iks_insert_attrib(usersetting, "xmlns", "google:setting");
-					x = iks_insert(usersetting,  "autoacceptrequests");
-					iks_insert_attrib(x, "value", "true");
-					x = iks_insert(usersetting,  "mailnotifications");
-					iks_insert_attrib(x, "value", "false");
-					free(njid);
+					iks_insert_attrib(iq, "type", "get");
+					iks_insert_attrib(iq, "id", "roster");
+					x = iks_insert(iq,  "query");
+					iks_insert_attrib(x, "xmlns", "jabber:iq:roster");
+					iks_insert_attrib(x, "xmlns:gr", "google:roster");
+					iks_insert_attrib(x, "gr:ext", "2");
+					iks_insert_attrib(x, "gr:include", "all");
 					iks_send(handle->parser, iq);
 					iks_delete(iq);
-					if ((iq = iks_new("iq"))) {
-						iks_insert_attrib(iq, "type", "get");
-						iks_insert_attrib(iq, "id", "roster");
-						x = iks_insert(iq,  "query");
-						iks_insert_attrib(x, "xmlns", "jabber:iq:roster");
-						iks_insert_attrib(x, "xmlns:gr", "google:roster");
-						iks_insert_attrib(x, "gr:ext", "2");
-						iks_insert_attrib(x, "gr:include", "all");
-						iks_send(handle->parser, iq);
-						iks_delete(iq);
-					}
-
-
+					break;
 				}
-				break;
 			}
 			tag = iks_next_tag(tag);
 		}
 	}
 
-	if ((is_result || !strcasecmp(type, "error")) && iqid && from) {
+	if ((is_result || is_error) && iqid && from) {
+
 		cancel_retry(handle, iqid);
 		if (is_result) {
 			if (handle->response_callback) {
 				handle->response_callback(handle, iqid); 
 			}
 			return IKS_FILTER_EAT;
+		} else if (is_error) {
+			return IKS_FILTER_EAT;
 		}
 	}
-
-
-
 	
 	xml = iks_child (pak->x);
 	while (xml) {
@@ -1087,6 +1094,31 @@
 	return session->private_data;
 }
 
+void ldl_session_accept_candidate(ldl_session_t *session, ldl_candidate_t *candidate)
+{
+	iks *iq, *sess, *tp;
+	unsigned int myid;
+    char idbuf[80];
+	myid = next_id();
+    snprintf(idbuf, sizeof(idbuf), "%u", myid);
+
+	iq = iks_new("iq");
+	iks_insert_attrib(iq, "type", "set");
+	iks_insert_attrib(iq, "id", idbuf);
+	iks_insert_attrib(iq, "from", session->handle->login);
+	iks_insert_attrib(iq, "to", session->them);
+	sess = iks_insert (iq, "session");
+    iks_insert_attrib(sess, "xmlns", "http://www.google.com/session");
+	iks_insert_attrib(sess, "type", "transport-accept");
+	iks_insert_attrib(sess, "id", candidate->tid);
+	iks_insert_attrib(sess, "xmlns", "http://www.google.com/session");
+	iks_insert_attrib(sess, "initiator", session->initiator ? session->initiator : session->them);
+	tp = iks_insert (sess, "transport");
+	iks_insert_attrib(tp, "xmlns", "http://www.google.com/transport/p2p");
+
+	apr_queue_push(session->handle->queue, iq);
+}
+
 void *ldl_handle_get_private(ldl_handle_t *handle)
 {
 	return handle->private_info;
@@ -1128,18 +1160,27 @@
 
 }
 
+
 unsigned int ldl_session_candidates(ldl_session_t *session,
-								  ldl_candidate_t *candidates,
-								  unsigned int clen)
+									ldl_candidate_t *candidates,
+									unsigned int clen)
 
 {
 	iks *iq, *sess, *tag;
 	unsigned int x, id;
 
-	new_session_iq(session, &iq, &sess, &id, "candidates");
+
 	for (x = 0; x < clen; x++) {
 		char buf[512];
-		tag = iks_insert(sess, "candidate");
+		iq = NULL;
+		sess = NULL;
+		id = 0;
+
+		new_session_iq(session, &iq, &sess, &id, "transport-info");
+		tag = iks_insert(sess, "transport");
+		iks_insert_attrib(tag, "xmlns", "http://www.google.com/transport/p2p");
+		tag = iks_insert(tag, "candidate");
+
 		if (candidates[x].name) {
 			iks_insert_attrib(tag, "name", candidates[x].name);
 		}
@@ -1169,13 +1210,13 @@
 
 		iks_insert_attrib(tag, "network", "0");
 		iks_insert_attrib(tag, "generation", "0");
+		schedule_packet(session->handle, id, iq, LDL_RETRY);
 	}
-	schedule_packet(session->handle, id, iq, LDL_RETRY);
 
+
 	return id;
 }
 
-
 char *ldl_handle_probe(ldl_handle_t *handle, char *id, char *buf, unsigned int len)
 {
 	iks *pres, *msg;
@@ -1232,13 +1273,14 @@
 								unsigned int plen,
 								ldl_description_t description)
 {
-	iks *iq, *sess, *tag, *payload;
+	iks *iq, *sess, *tag, *payload, *tp;
 	unsigned int x, id;
 	
 
 	new_session_iq(session, &iq, &sess, &id, description == LDL_DESCRIPTION_ACCEPT ? "accept" : "initiate");
 	tag = iks_insert(sess, "description");
 	iks_insert_attrib(tag, "xmlns", "http://www.google.com/session/phone");
+	iks_insert_attrib(tag, "xml:lang", "en");
 	for (x = 0; x < plen; x++) {
 		char idbuf[80];
 		payload = iks_insert(tag, "payload-type");
@@ -1249,10 +1291,19 @@
 		iks_insert_attrib(payload, "name", payloads[x].name);
 		if (payloads[x].rate) {
 			sprintf(idbuf, "%d", payloads[x].rate);
-			iks_insert_attrib(payload, "rate", idbuf);
+			iks_insert_attrib(payload, "clockrate", idbuf);
 		}
+		if (payloads[x].bps) {
+			sprintf(idbuf, "%d", payloads[x].bps);
+			iks_insert_attrib(payload, "bitrate", idbuf);
+		}
 	}
 
+	if (description == LDL_DESCRIPTION_INITIATE) {
+		tp = iks_insert (sess, "transport");
+		iks_insert_attrib(tp, "xmlns", "http://www.google.com/transport/p2p");
+	}
+	
 	schedule_packet(session->handle, id, iq, LDL_RETRY);
 
 	return id;
@@ -1421,6 +1472,7 @@
 		new_handle->sessions = apr_hash_make(new_handle->pool);
 		new_handle->retry_hash = apr_hash_make(new_handle->pool);
 		new_handle->probe_hash = apr_hash_make(new_handle->pool);
+		new_handle->sub_hash = apr_hash_make(new_handle->pool);
 		apr_thread_mutex_create(&new_handle->lock, APR_THREAD_MUTEX_NESTED, new_handle->pool);
 		apr_thread_mutex_create(&new_handle->flag_mutex, APR_THREAD_MUTEX_NESTED, new_handle->pool);
 

Modified: freeswitch/branches/mishehu/libs/libdingaling/src/libdingaling.h
==============================================================================
--- freeswitch/branches/mishehu/libs/libdingaling/src/libdingaling.h	(original)
+++ freeswitch/branches/mishehu/libs/libdingaling/src/libdingaling.h	Sun Aug 27 11:43:21 2006
@@ -53,6 +53,8 @@
 
 /*! \brief A structure to store a jingle candidate */
 struct ldl_candidate {
+	/*! the transport id of the candidate */
+	char *tid;
 	/*! the name of the candidate */
 	char *name;
 	/*! the type of the candidate */
@@ -80,6 +82,8 @@
 	unsigned int id;
 	/*! the transfer rate of the payload type */
 	unsigned int rate;
+	/*! the bits per second of the payload type */
+	unsigned int bps;
 };
 typedef struct ldl_payload ldl_payload_t;
 
@@ -119,7 +123,8 @@
 	LDL_SIGNAL_ERROR,
 	LDL_SIGNAL_LOGIN_SUCCESS,
 	LDL_SIGNAL_LOGIN_FAILURE,
-	LDL_SIGNAL_CONNECTED
+	LDL_SIGNAL_CONNECTED,
+	LDL_SIGNAL_TRANSPORT_ACCEPT
 } ldl_signal_t;
 
 typedef enum {
@@ -287,6 +292,13 @@
 void *ldl_session_get_private(ldl_session_t *session);
 
 /*!
+  \brief Accept a candidate
+  \param session the session to accept on
+  \param candidate the candidate to accept
+*/
+void ldl_session_accept_candidate(ldl_session_t *session, ldl_candidate_t *candidate);
+
+/*!
   \brief Set a custom logger
   \param logger the logger function
 */
@@ -316,6 +328,14 @@
 */
 void *ldl_handle_get_private(ldl_handle_t *handle);
 
+/*!
+  \brief Send a message to a session
+  \param session the session handle
+  \param to the message recipiant
+  \param subject optional subject
+  \param body body of the message
+*/
+void ldl_session_send_msg(ldl_session_t *session, char *subject, char *body);
 
 /*!
   \brief Send a message

Modified: freeswitch/branches/mishehu/libs/libteletone/libteletone.vcproj
==============================================================================
--- freeswitch/branches/mishehu/libs/libteletone/libteletone.vcproj	(original)
+++ freeswitch/branches/mishehu/libs/libteletone/libteletone.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,7 +17,7 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			CharacterSet="1"
@@ -94,7 +94,7 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			CharacterSet="1"

Modified: freeswitch/branches/mishehu/libs/mozilla.build.sh
==============================================================================
--- freeswitch/branches/mishehu/libs/mozilla.build.sh	(original)
+++ freeswitch/branches/mishehu/libs/mozilla.build.sh	Sun Aug 27 11:43:21 2006
@@ -5,7 +5,7 @@
 opts="--enable-64bit"
 fi
 
-cd nsprpub && ./configure $opts && make
+cd nsprpub && ./configure $opts && $MAKE
 
-cd ../js/src && JS_THREADSAFE=1 OTHER_LIBS="-L../../../mozilla/nsprpub/dist/lib" INCLUDES="-I../../../mozilla/nsprpub/dist/include/nspr"  make -f Makefile.ref `find . -name libjs.a`
+cd ../js/src && JS_THREADSAFE=1 JS_HAS_FILE_OBJECT=1 OTHER_LIBS="-L../../../mozilla/nsprpub/dist/lib" INCLUDES="-I../../../mozilla/nsprpub/dist/include/nspr"  $MAKE -f Makefile.ref `find . -name libjs.a`
 

Modified: freeswitch/branches/mishehu/libs/srtp.build.sh
==============================================================================
--- freeswitch/branches/mishehu/libs/srtp.build.sh	(original)
+++ freeswitch/branches/mishehu/libs/srtp.build.sh	Sun Aug 27 11:43:21 2006
@@ -7,8 +7,8 @@
 
 ./configure $@ $opts
 
-make clean uninstall all
-make install
+$MAKE clean uninstall all
+$MAKE install
 
 
 

Modified: freeswitch/branches/mishehu/mac/xcode/FreeSWITCH.xcodeproj/project.pbxproj
==============================================================================
--- freeswitch/branches/mishehu/mac/xcode/FreeSWITCH.xcodeproj/project.pbxproj	(original)
+++ freeswitch/branches/mishehu/mac/xcode/FreeSWITCH.xcodeproj/project.pbxproj	Sun Aug 27 11:43:21 2006
@@ -195,6 +195,30 @@
 		D34725610A76D91E001C8ED7 /* apr.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3DEC21D0A75CB06002001CF /* apr.framework */; };
 		D34725C40A76D954001C8ED7 /* mod_iax.c in Sources */ = {isa = PBXBuildFile; fileRef = D34725C30A76D954001C8ED7 /* mod_iax.c */; };
 		D34725CA0A76D9BF001C8ED7 /* iax.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D34725350A76D7B1001C8ED7 /* iax.framework */; };
+		D35834B20A8F8047004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834B40A8F8052004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834B50A8F8058004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834B60A8F805D004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834B70A8F8069004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834B80A8F806E004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834B90A8F8072004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834BA0A8F807A004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834BB0A8F807F004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834BC0A8F8085004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834BE0A8F8094004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834BF0A8F8099004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834C00A8F809F004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834C10A8F80A3004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834C20A8F80A9004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834C30A8F80AF004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834C40A8F80B3004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834C50A8F80BB004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834C60A8F80C1004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834C70A8F80C9004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834C90A8F80D1004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834CA0A8F80D6004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834DD0A8F968C004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+		D35834DE0A8F9699004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
 		D36500860A76BE4700C47A76 /* mod_dialplan_xml.c in Sources */ = {isa = PBXBuildFile; fileRef = D36500850A76BE4700C47A76 /* mod_dialplan_xml.c */; };
 		D36500870A76BE5A00C47A76 /* apr.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3DEC21D0A75CB06002001CF /* apr.framework */; };
 		D36500880A76BE5A00C47A76 /* aprutil.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3DEC6CF0A75D4E9002001CF /* aprutil.framework */; };
@@ -1171,6 +1195,13 @@
 			remoteGlobalIDString = D34725340A76D7B1001C8ED7;
 			remoteInfo = iax2;
 		};
+		D35834D60A8F9679004459D4 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = D36500F00A76BE9400C47A76 /* pcre */;
+			remoteInfo = pcre;
+		};
 		D36501760A76C28200C47A76 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
@@ -2481,6 +2512,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834C30A8F80AF004459D4 /* pcre.framework in Frameworks */,
 				D3152FB50A76F27000549119 /* apr.framework in Frameworks */,
 				D3152FB60A76F27000549119 /* aprutil.framework in Frameworks */,
 				D3152FB70A76F27000549119 /* libfreeswitch.framework in Frameworks */,
@@ -2498,6 +2530,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834C20A8F80A9004459D4 /* pcre.framework in Frameworks */,
 				D34725CA0A76D9BF001C8ED7 /* iax.framework in Frameworks */,
 				D347255B0A76D91E001C8ED7 /* teletone.framework in Frameworks */,
 				D347255C0A76D91E001C8ED7 /* srtp.framework in Frameworks */,
@@ -2539,6 +2572,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834BE0A8F8094004459D4 /* pcre.framework in Frameworks */,
 				D36501F10A76C64200C47A76 /* apr.framework in Frameworks */,
 				D36501F20A76C64200C47A76 /* aprutil.framework in Frameworks */,
 				D36501F30A76C64200C47A76 /* libfreeswitch.framework in Frameworks */,
@@ -2555,6 +2589,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834BF0A8F8099004459D4 /* pcre.framework in Frameworks */,
 				D36501F80A76C64A00C47A76 /* apr.framework in Frameworks */,
 				D36501F90A76C64A00C47A76 /* aprutil.framework in Frameworks */,
 				D36501FA0A76C64A00C47A76 /* libfreeswitch.framework in Frameworks */,
@@ -2571,6 +2606,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834C00A8F809F004459D4 /* pcre.framework in Frameworks */,
 				D36501FF0A76C65300C47A76 /* apr.framework in Frameworks */,
 				D36502000A76C65300C47A76 /* aprutil.framework in Frameworks */,
 				D36502010A76C65300C47A76 /* libfreeswitch.framework in Frameworks */,
@@ -2594,6 +2630,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834C10A8F80A3004459D4 /* pcre.framework in Frameworks */,
 				D365025F0A76C91100C47A76 /* gsm.framework in Frameworks */,
 				D36502570A76C90700C47A76 /* apr.framework in Frameworks */,
 				D36502580A76C90700C47A76 /* aprutil.framework in Frameworks */,
@@ -2642,6 +2679,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834DD0A8F968C004459D4 /* pcre.framework in Frameworks */,
 				D30DE7670A7819B300C8AAD5 /* System.framework in Frameworks */,
 				D38DD5540A768CB100FEDB19 /* resample.framework in Frameworks */,
 				D38DD51F0A768B4700FEDB19 /* srtp.framework in Frameworks */,
@@ -2656,6 +2694,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834DE0A8F9699004459D4 /* pcre.framework in Frameworks */,
 				D38DD55C0A768CD600FEDB19 /* srtp.framework in Frameworks */,
 				D38DD55A0A768CCB00FEDB19 /* speakup.framework in Frameworks */,
 				D38DD5590A768CC700FEDB19 /* resample.framework in Frameworks */,
@@ -2671,6 +2710,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834C40A8F80B3004459D4 /* pcre.framework in Frameworks */,
 				D3B4072E0A76EED9000AF6D4 /* speex.framework in Frameworks */,
 				D3B406CA0A76EED0000AF6D4 /* apr.framework in Frameworks */,
 				D3B406CB0A76EED0000AF6D4 /* aprutil.framework in Frameworks */,
@@ -2688,6 +2728,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834B20A8F8047004459D4 /* pcre.framework in Frameworks */,
 				D3BC32480A769B9C00DE971E /* teletone.framework in Frameworks */,
 				D3BC32460A769B9100DE971E /* resample.framework in Frameworks */,
 				D3BC32450A769B8C00DE971E /* srtp.framework in Frameworks */,
@@ -2704,6 +2745,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834B40A8F8052004459D4 /* pcre.framework in Frameworks */,
 				D3BC326A0A769D7700DE971E /* teletone.framework in Frameworks */,
 				D3BC326B0A769D7700DE971E /* resample.framework in Frameworks */,
 				D3BC326C0A769D7700DE971E /* srtp.framework in Frameworks */,
@@ -2722,6 +2764,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834B50A8F8058004459D4 /* pcre.framework in Frameworks */,
 				D3BC32850A769E2700DE971E /* teletone.framework in Frameworks */,
 				D3BC32860A769E2700DE971E /* resample.framework in Frameworks */,
 				D3BC32870A769E2700DE971E /* srtp.framework in Frameworks */,
@@ -2754,6 +2797,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834B60A8F805D004459D4 /* pcre.framework in Frameworks */,
 				D3BC32ED0A76A75B00DE971E /* teletone.framework in Frameworks */,
 				D3BC32EE0A76A75B00DE971E /* resample.framework in Frameworks */,
 				D3BC32EF0A76A75B00DE971E /* srtp.framework in Frameworks */,
@@ -2770,6 +2814,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834B70A8F8069004459D4 /* pcre.framework in Frameworks */,
 				D3BC33000A76A7EB00DE971E /* teletone.framework in Frameworks */,
 				D3BC33010A76A7EB00DE971E /* resample.framework in Frameworks */,
 				D3BC33020A76A7EB00DE971E /* srtp.framework in Frameworks */,
@@ -2786,6 +2831,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834B90A8F8072004459D4 /* pcre.framework in Frameworks */,
 				D3BC33130A76A86A00DE971E /* apr.framework in Frameworks */,
 				D3BC33140A76A86A00DE971E /* aprutil.framework in Frameworks */,
 				D3BC33150A76A86A00DE971E /* libfreeswitch.framework in Frameworks */,
@@ -2802,6 +2848,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834B80A8F806E004459D4 /* pcre.framework in Frameworks */,
 				D3BC332A0A76A8BC00DE971E /* apr.framework in Frameworks */,
 				D3BC332B0A76A8BC00DE971E /* aprutil.framework in Frameworks */,
 				D3BC332C0A76A8BC00DE971E /* libfreeswitch.framework in Frameworks */,
@@ -2818,6 +2865,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834BA0A8F807A004459D4 /* pcre.framework in Frameworks */,
 				D3BC33450A76AA0D00DE971E /* apr.framework in Frameworks */,
 				D3BC33460A76AA0D00DE971E /* aprutil.framework in Frameworks */,
 				D3BC33470A76AA0D00DE971E /* libfreeswitch.framework in Frameworks */,
@@ -2842,6 +2890,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834BB0A8F807F004459D4 /* pcre.framework in Frameworks */,
 				D3BC34DC0A76B05C00DE971E /* sndfile.framework in Frameworks */,
 				D3BC34D40A76B04600DE971E /* apr.framework in Frameworks */,
 				D3BC34D50A76B04600DE971E /* aprutil.framework in Frameworks */,
@@ -2859,6 +2908,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834BC0A8F8085004459D4 /* pcre.framework in Frameworks */,
 				D3BC34ED0A76B17800DE971E /* apr.framework in Frameworks */,
 				D3BC34EE0A76B17800DE971E /* aprutil.framework in Frameworks */,
 				D3BC34EF0A76B17800DE971E /* libfreeswitch.framework in Frameworks */,
@@ -2893,6 +2943,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834C60A8F80C1004459D4 /* pcre.framework in Frameworks */,
 				D3E66A800A77E63C00D04E25 /* apr.framework in Frameworks */,
 				D3E66A810A77E63C00D04E25 /* aprutil.framework in Frameworks */,
 				D3E66A820A77E63C00D04E25 /* libfreeswitch.framework in Frameworks */,
@@ -2909,6 +2960,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834C70A8F80C9004459D4 /* pcre.framework in Frameworks */,
 				D3E66B190A77E7F400D04E25 /* apr.framework in Frameworks */,
 				D3E66B1A0A77E7F400D04E25 /* aprutil.framework in Frameworks */,
 				D3E66B1B0A77E7F400D04E25 /* libfreeswitch.framework in Frameworks */,
@@ -2925,6 +2977,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834C90A8F80D1004459D4 /* pcre.framework in Frameworks */,
 				D3E66B200A77E7FC00D04E25 /* apr.framework in Frameworks */,
 				D3E66B210A77E7FC00D04E25 /* aprutil.framework in Frameworks */,
 				D3E66B220A77E7FC00D04E25 /* libfreeswitch.framework in Frameworks */,
@@ -2941,6 +2994,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834CA0A8F80D6004459D4 /* pcre.framework in Frameworks */,
 				D3E66B270A77E80400D04E25 /* apr.framework in Frameworks */,
 				D3E66B280A77E80400D04E25 /* aprutil.framework in Frameworks */,
 				D3E66B290A77E80400D04E25 /* libfreeswitch.framework in Frameworks */,
@@ -2981,6 +3035,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D35834C50A8F80BB004459D4 /* pcre.framework in Frameworks */,
 				D3AA5D290A77D54A008F105E /* exosip2.framework in Frameworks */,
 				D3AA5D2A0A77D54A008F105E /* osip2.framework in Frameworks */,
 				D3AA5D2B0A77D54A008F105E /* osipparser2.framework in Frameworks */,
@@ -5739,6 +5794,7 @@
 			buildRules = (
 			);
 			dependencies = (
+				D35834D70A8F9679004459D4 /* PBXTargetDependency */,
 				D36501BF0A76C40000C47A76 /* PBXTargetDependency */,
 				D36501D50A76C54300C47A76 /* PBXTargetDependency */,
 				D36501BD0A76C3FB00C47A76 /* PBXTargetDependency */,
@@ -7368,6 +7424,11 @@
 			isa = PBXTargetDependency;
 			target = D34725340A76D7B1001C8ED7 /* iax */;
 			targetProxy = D34725570A76D904001C8ED7 /* PBXContainerItemProxy */;
+		};
+		D35834D70A8F9679004459D4 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = D36500F00A76BE9400C47A76 /* pcre */;
+			targetProxy = D35834D60A8F9679004459D4 /* PBXContainerItemProxy */;
 		};
 		D36501770A76C28200C47A76 /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;

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	Sun Aug 27 11:43:21 2006
@@ -117,6 +117,14 @@
 SWITCH_DECLARE(switch_status_t) switch_core_init(char *console, const char **err);
 
 /*! 
+  \brief Initilize the core and load modules
+  \param console optional FILE stream for output
+  \param err a pointer to set any errors to
+  \note to be called at application startup instead of switch_core_init.  Includes module loading.
+*/
+SWITCH_DECLARE(switch_status_t) switch_core_init_and_modload(char *console, const char **err);
+
+/*! 
   \brief Set/Get Session Limit
   \param new_limit new value (if > 0)
   \return the current session limit
@@ -442,6 +450,14 @@
   \return the status returned by the message handler
 */
 SWITCH_DECLARE(switch_status_t) switch_core_session_queue_event(switch_core_session_t *session, switch_event_t **event);
+
+
+/*! 
+  \brief Indicate the number of waiting events on a session
+  \param session the session to check
+  \return the number of events
+*/
+SWITCH_DECLARE(int32_t) switch_core_session_event_count(switch_core_session_t *session);
 
 /*! 
   \brief DE-Queue an event on a given session

Modified: freeswitch/branches/mishehu/src/include/switch_event.h
==============================================================================
--- freeswitch/branches/mishehu/src/include/switch_event.h	(original)
+++ freeswitch/branches/mishehu/src/include/switch_event.h	Sun Aug 27 11:43:21 2006
@@ -156,6 +156,13 @@
 SWITCH_DECLARE(char *) switch_event_get_header(switch_event_t *event, char *header_name);
 
 /*!
+  \brief Retrieve the body value from an event
+  \param event the event to read the body from
+  \return the value of the body or NULL
+*/
+SWITCH_DECLARE(char *) switch_event_get_body(switch_event_t *event);
+
+/*!
   \brief Add a header to an event
   \param event the event to add the header to
   \param stack the stack sense (stack it on the top or on the bottom)

Modified: freeswitch/branches/mishehu/src/include/switch_ivr.h
==============================================================================
--- freeswitch/branches/mishehu/src/include/switch_ivr.h	(original)
+++ freeswitch/branches/mishehu/src/include/switch_ivr.h	Sun Aug 27 11:43:21 2006
@@ -164,23 +164,41 @@
 													  void *buf,
 													  unsigned int buflen);
 
+/*!
+  \brief Make an outgoing call
+  \param session originating session
+  \param bleg B leg session
+  \param bridgeto the desired remote callstring
+  \param timelimit_sec timeout in seconds for outgoing call
+  \param table optional state handler table to install on the channel
+  \param cid_name_override override the caller id name
+  \param cid_num_override override the caller id number
+  \param caller_profile_override override the entire calling caller profile
+  \return SWITCH_STATUS_SUCCESS if bleg is a running session.
+*/
+SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *session,
+													 switch_core_session_t **bleg,
+													 char *bridgeto,
+													 uint32_t timelimit_sec,
+													 const switch_state_handler_table_t *table,
+													 char *cid_name_override,
+													 char *cid_num_override,
+													 switch_caller_profile_t *caller_profile_override);
 
 /*!
   \brief Bridge Audio from one session to another
   \param session one session
   \param peer_session the other session
-  \param timelimit maximum number of seconds to wait for both channels to be answered
   \param dtmf_callback code to execute if any dtmf is dialed during the bridge
   \param session_data data to pass to the DTMF callback for session
   \param peer_session_data data to pass to the DTMF callback for peer_session
   \return SWITCH_STATUS_SUCCESS if all is well
 */
 SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session, 
-															   switch_core_session_t *peer_session,
-															   unsigned int timelimit,
-															   switch_input_callback_function_t dtmf_callback,
-															   void *session_data,
-															   void *peer_session_data);
+																 switch_core_session_t *peer_session,
+																 switch_input_callback_function_t dtmf_callback,
+																 void *session_data,
+																 void *peer_session_data);
 
 
 /*!

Modified: freeswitch/branches/mishehu/src/include/switch_platform.h
==============================================================================
--- freeswitch/branches/mishehu/src/include/switch_platform.h	(original)
+++ freeswitch/branches/mishehu/src/include/switch_platform.h	Sun Aug 27 11:43:21 2006
@@ -44,13 +44,6 @@
 
 #ifdef _MSC_VER
 
-#ifndef FREESWITCHCORE_EXPORTS
-#pragma comment(lib, "FreeSwitchCore.lib")
-#pragma comment(lib, "libapr-1.lib")
-#pragma comment(lib, "libaprutil-1.lib")
-#pragma comment(lib, "libapriconv-1.lib")
-#pragma comment(lib, "sqlite.lib")
-#endif
 
 /* disable the following warnings 
  * C4152: non standard extension, function/data ptr conversion in expression

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	Sun Aug 27 11:43:21 2006
@@ -86,7 +86,7 @@
 typedef struct switch_directories switch_directories;
 SWITCH_DECLARE_DATA extern switch_directories SWITCH_GLOBAL_dirs;
 
-#define SWITCH_THREAD_STACKSIZE 512 * 1024
+#define SWITCH_THREAD_STACKSIZE 384 * 1024
 #define SWITCH_RECCOMMENDED_BUFFER_SIZE 2048
 #define SWITCH_MAX_CODECS 30
 #define SWITCH_MAX_STATE_HANDLERS 30
@@ -355,6 +355,8 @@
 CF_BRIDGED		= (1 <<  7) - Channel in a bridge
 CF_HOLD			= (1 <<  8) - Channel is on hold
 CF_SERVICE		= (1 <<  9) - Channel has a service thread
+CF_TAGGED		= (1 << 10) - Channel is tagged
+CF_WINNER		= (1 << 10) - Channel is the winner
 </pre>
  */
 
@@ -368,7 +370,9 @@
 	CF_LOCK_THREAD	= (1 <<  6),
 	CF_BRIDGED		= (1 <<  7),
 	CF_HOLD			= (1 <<  8),
-	CF_SERVICE		= (1 <<  9)
+	CF_SERVICE		= (1 <<  9),
+	CF_TAGGED		= (1 << 10),
+	CF_WINNER		= (1 << 11)
 } switch_channel_flag_t;
 
 
@@ -554,6 +558,7 @@
 	SWITCH_EVENT_MODULE_LOAD		- Module was loaded
 	SWITCH_EVENT_DTMF				- DTMF was sent
 	SWITCH_EVENT_MESSAGE			- A Basic Message
+	SWITCH_EVENT_CODEC				- Codec Change
     SWITCH_EVENT_ALL				- All events at once
 </pre>
 
@@ -582,6 +587,7 @@
 	SWITCH_EVENT_MODULE_LOAD,
 	SWITCH_EVENT_DTMF,
 	SWITCH_EVENT_MESSAGE,
+	SWITCH_EVENT_CODEC,
 	SWITCH_EVENT_ALL
 } switch_event_types_t;
 
@@ -636,7 +642,8 @@
 	SWITCH_CAUSE_PROTOCOL_ERROR = 111,
 	SWITCH_CAUSE_INTERWORKING = 127,
 	SWITCH_CAUSE_CRASH = 500,
-	SWITCH_CAUSE_SYSTEM_SHUTDOWN = 501
+	SWITCH_CAUSE_SYSTEM_SHUTDOWN = 501,
+	SWITCH_CAUSE_LOSE_RACE = 502
 } switch_call_cause_t;
 
 

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_bridgecall/mod_bridgecall.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_bridgecall/mod_bridgecall.c	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_bridgecall/mod_bridgecall.c	Sun Aug 27 11:43:21 2006
@@ -40,43 +40,22 @@
 {
 	switch_channel_t *caller_channel;
 	switch_core_session_t *peer_session;
-	switch_caller_profile_t *caller_profile, *caller_caller_profile;
-	char chan_type[128] = { '\0' }, *chan_data;
-	unsigned int timelimit = 60;			/* probably a useful option to pass in when there's time */
+	unsigned int timelimit = 60;
+	char *var;
+
 	caller_channel = switch_core_session_get_channel(session);
 	assert(caller_channel != NULL);
 
-
-	strncpy(chan_type, data, sizeof(chan_type));
-
-	if ((chan_data = strchr(chan_type, '/')) != 0) {
-		*chan_data = '\0';
-		chan_data++;
+	if ((var = switch_channel_get_variable(caller_channel, "call_timeout"))) {
+		timelimit = atoi(var);
 	}
 
-	caller_caller_profile = switch_channel_get_caller_profile(caller_channel);
-	caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
-											   caller_caller_profile->username,
-											   caller_caller_profile->dialplan,
-											   caller_caller_profile->caller_id_name,
-											   caller_caller_profile->caller_id_number,
-											   caller_caller_profile->network_addr, 
-											   NULL, 
-											   NULL, 
-											   caller_caller_profile->rdnis,
-											   caller_caller_profile->source,
-											   caller_caller_profile->context,
-											   chan_data);
-
-
-
-	if (switch_core_session_outgoing_channel(session, chan_type, caller_profile, &peer_session, NULL) !=
-		SWITCH_STATUS_SUCCESS) {
+	if (switch_ivr_originate(session, &peer_session, data, timelimit, NULL, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
 		switch_channel_hangup(caller_channel, SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL);
 		return;
 	} else {
-		switch_ivr_multi_threaded_bridge(session, peer_session, timelimit, NULL, NULL, NULL);
+		switch_ivr_multi_threaded_bridge(session, peer_session, NULL, NULL, NULL);
 	}
 }
 

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_bridgecall/mod_bridgecall.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_bridgecall/mod_bridgecall.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_bridgecall/mod_bridgecall.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_bridgecall.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_bridgecall.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_bridgecall.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_bridgecall.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_commands/mod_commands.c	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_commands/mod_commands.c	Sun Aug 27 11:43:21 2006
@@ -209,6 +209,72 @@
 	return SWITCH_STATUS_SUCCESS;
 }
 
+static switch_status_t originate_function(char *cmd, switch_core_session_t *isession, switch_stream_handle_t *stream)
+{
+	switch_channel_t *caller_channel;
+	switch_core_session_t *caller_session;
+	char *argv[7] = {0};
+	int x, argc = 0;
+	char *aleg, *exten, *dp, *context, *cid_name, *cid_num;
+	uint32_t timeout = 60;
+
+	if (isession) {
+		stream->write_function(stream, "Illegal Usage\n");
+		return SWITCH_STATUS_SUCCESS;
+	}
+
+	if (switch_strlen_zero(cmd)) {
+		stream->write_function(stream, "Usage: originate <call url> <exten> [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]\n");
+		return SWITCH_STATUS_SUCCESS;
+	}
+
+	argc = switch_separate_string(cmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
+
+	for(x = 0; x < argc; x++) {
+		if (!strcasecmp(argv[x], "undef")) {
+			argv[x] = NULL;
+		}
+	}
+
+	aleg = argv[0];
+	exten = argv[1];
+	dp = argv[2];
+	context = argv[3];
+	cid_name = argv[4];
+	cid_num = argv[5];
+	
+	if (!dp) {
+		dp = "XML";
+	}
+
+	if (!context) {
+		context = "default";
+	}
+
+	if (argv[6]) {
+		timeout = atoi(argv[6]);
+	}
+
+	if (!aleg && exten) {
+		stream->write_function(stream, "Invalid Arguements\n");
+		return SWITCH_STATUS_SUCCESS;
+	}
+
+	if (switch_ivr_originate(NULL, &caller_session, aleg, timeout, NULL, cid_name, cid_num, NULL) != SWITCH_STATUS_SUCCESS) {
+		stream->write_function(stream, "Cannot Create Outgoing Channel! [%s]\n", aleg);
+		return SWITCH_STATUS_SUCCESS;
+	} 
+
+	caller_channel = switch_core_session_get_channel(caller_session);
+	assert(caller_channel != NULL);
+	switch_channel_clear_state_handler(caller_channel, NULL);
+	switch_core_session_rwunlock(caller_session);
+
+	switch_ivr_session_transfer(caller_session, exten, dp, context);
+
+	return SWITCH_STATUS_SUCCESS;;
+}
+
 struct holder {
 	switch_stream_handle_t *stream;
 	char *http;
@@ -349,7 +415,7 @@
 
 static switch_api_interface_t load_api_interface = {
 	/*.interface_name */ "load",
-	/*.desc */ "Load Modile",
+	/*.desc */ "Load Module",
 	/*.function */ load_function,
 	/*.next */ &transfer_api_interface
 };
@@ -369,6 +435,14 @@
 	/*.next */ &reload_api_interface
 };
 
+static switch_api_interface_t originate_api_interface = {
+	/*.interface_name */ "originate",
+	/*.desc */ "Originate a Call",
+	/*.function */ originate_function,
+	/*.next */ &commands_api_interface
+};
+
+
 static const switch_loadable_module_interface_t mod_commands_module_interface = {
 	/*.module_name */ modname,
 	/*.endpoint_interface */ NULL,
@@ -376,7 +450,7 @@
 	/*.dialplan_interface */ NULL,
 	/*.codec_interface */ NULL,
 	/*.application_interface */ NULL,
-	/*.api_interface */ &commands_api_interface
+	/*.api_interface */ &originate_api_interface
 };
 
 

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_commands/mod_commands.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_commands/mod_commands.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_commands/mod_commands.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_commands.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_commands.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_commands.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_commands.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_conference/mod_conference.c	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_conference/mod_conference.c	Sun Aug 27 11:43:21 2006
@@ -53,6 +53,8 @@
 	switch_mutex_t *id_mutex;
 	switch_mutex_t *hash_mutex;
 	uint32_t id_pool;
+	int32_t running;
+	uint32_t threads;
 } globals;
 
 struct conference_member;
@@ -119,6 +121,7 @@
 	char *pin;
 	char *pin_sound;
 	char *bad_pin_sound;
+	char *profile_name;
 	uint32_t flags;
 	switch_mutex_t *flag_mutex;
 	uint32_t rate;
@@ -190,7 +193,12 @@
 static void conference_list(conference_obj_t *conference, switch_stream_handle_t *stream, char *delim);
 static switch_status_t conf_function(char *buf, switch_core_session_t *session, switch_stream_handle_t *stream);
 static switch_status_t audio_bridge_on_ring(switch_core_session_t *session);
-static switch_status_t conference_outcall(conference_obj_t *conference, switch_core_session_t *session, char *bridgeto, char *cid_name, char *cid_num);
+static switch_status_t conference_outcall(conference_obj_t *conference,
+										  switch_core_session_t *session,
+										  char *bridgeto,
+										  uint32_t timeout,
+										  char *cid_name,
+										  char *cid_num);
 static void conference_function(switch_core_session_t *session, char *data);
 static void launch_conference_thread(conference_obj_t *conference);
 static void *SWITCH_THREAD_FUNC input_thread_run(switch_thread_t *thread, void *obj);
@@ -451,7 +459,9 @@
 		return NULL;
 	}
 
-	while(!switch_test_flag(conference, CFLAG_DESTRUCT)) {
+	globals.threads++;
+
+	while(globals.running && !switch_test_flag(conference, CFLAG_DESTRUCT)) {
 		uint8_t file_frame[CONF_BUFFER_SIZE] = {0};
 		switch_size_t file_sample_len = samples;
 		switch_size_t file_data_len = samples * 2;
@@ -654,7 +664,8 @@
 			switch_core_destroy_memory_pool(&pool);
 		}
 	}
-	
+
+	globals.threads--;	
 	return NULL;
 }
 
@@ -686,8 +697,10 @@
 		return;
 	}
 
-	/* Answer the channel */
-	switch_channel_answer(channel);
+	if (!switch_channel_test_flag(channel, CF_OUTBOUND)) {
+		/* Answer the channel */
+		switch_channel_answer(channel);
+	}
 
 	/* Prepare the write frame */
 	write_frame.data = data;
@@ -1382,7 +1395,7 @@
 					goto done;
 				} else if (!strcasecmp(argv[1], "dial")) {
 					if (argc > 2) {
-						conference_outcall(conference, NULL, argv[2], argv[3], argv[4]);
+						conference_outcall(conference, NULL, argv[2], 60, argv[3], argv[4]);
 						stream->write_function(stream, "OK\n");
 						goto done;
 					} else {
@@ -1795,34 +1808,83 @@
 						conference_member_t *member = NULL;
 						uint32_t id = atoi(argv[2]);
 						conference_obj_t *new_conference = NULL;
+						switch_channel_t *channel;
+						switch_event_t *event;
+						char *profile_name;
+						switch_xml_t cxml = NULL, cfg = NULL, profile = NULL, profiles = NULL;
 
-						if ((new_conference = (conference_obj_t *) switch_core_hash_find(globals.conference_hash, argv[3]))) {
-							if ((member = conference_member_get(conference, id))) {								
-								switch_channel_t *channel = switch_core_session_get_channel(member->session);
-								switch_event_t *event;
-								
-								conference_del_member(member->last_conference, member);
-								conference_add_member(new_conference, member);
-								stream->write_function(stream, "OK Member %u sent to conference %s.\n", id, argv[3]);
+						if (!(member = conference_member_get(conference, id))) {								
+							stream->write_function(stream, "No Member %u in conference %s.\n", id, conference->name);
+							goto done;
+						}
+						
+						channel = switch_core_session_get_channel(member->session);
+						
+						if (!(new_conference = (conference_obj_t *) switch_core_hash_find(globals.conference_hash, argv[3]))) {
+							switch_memory_pool_t *pool;
+							char *conf_name;
 
-								if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
-									switch_channel_event_set_data(channel, event);
-									switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-ID", "%u", member->id);
-									switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Old-Conference-Name", conference->name);
-									switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-Conference-Name", argv[3]);
-									switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "transfer");
-									switch_event_fire(&event);
+							/* Setup a memory pool to use. */
+							if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
+								switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Pool Failure\n");
+								goto done;
+							}
+
+							conf_name = switch_core_strdup(pool, argv[3]);
+							
+							if ((profile_name = strchr(conf_name, '@'))) {
+								*profile_name++ = '\0';
+								
+								/* Open the config from the xml registry */
+								if (!(cxml = switch_xml_open_cfg(global_cf_name, &cfg, NULL))) {
+									switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", global_cf_name);
+									goto done;
 								}
+								
+								if ((profiles = switch_xml_child(cfg, "profiles"))) {
+									profile = switch_xml_find_child(profiles, "profile", "name", profile_name);
+								}
+							} 
+							
+
+							/* Release the config registry handle */
+							if (cxml) {
+								switch_xml_free(cxml);
+								cxml = NULL;
+							}
+
+							/* Create the conference object. */
+							new_conference = conference_new(conf_name, profile, pool);
+							
+							
+							if (!new_conference) {
+								switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
 								goto done;
-							} else {
-								stream->write_function(stream, "No Member %u in conference %s.\n", id, conference->name);
-								goto done;
 							}
-						} else {
-							stream->write_function(stream, "No Conference called %s found.\n", argv[3]);
-							goto done;
+							
+							/* Set the minimum number of members (once you go above it you cannot go below it) */
+							new_conference->min = 1;
+							
+							/* Indicate the conference is dynamic */
+							switch_set_flag_locked(new_conference, CFLAG_DYNAMIC);
+							
+							/* Start the conference thread for this conference */
+							launch_conference_thread(new_conference);
 						}
 
+						conference_del_member(member->last_conference, member);
+						conference_add_member(new_conference, member);
+						stream->write_function(stream, "OK Member %u sent to conference %s.\n", id, argv[3]);
+						
+						if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
+							switch_channel_event_set_data(channel, event);
+							switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-ID", "%u", member->id);
+							switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Old-Conference-Name", conference->name);
+							switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-Conference-Name", argv[3]);
+							switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "transfer");
+							switch_event_fire(&event);
+						}
+						
 					} else {
 						stream->write_function(stream, transfer_usage);
 						goto done;
@@ -1953,6 +2015,7 @@
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CUSTOM RING\n");
 
 	/* put the channel in a passive state so we can loop audio to it */
+	switch_channel_set_state(channel, CS_TRANSMIT);
 	return SWITCH_STATUS_FALSE;
 }
 
@@ -1966,151 +2029,39 @@
 	/*.on_hold */ NULL,
 };
 
-static switch_status_t conference_outcall(conference_obj_t *conference, switch_core_session_t *session, char *bridgeto, char *cid_name, char *cid_num)
+static switch_status_t conference_outcall(conference_obj_t *conference,
+										  switch_core_session_t *session,
+										  char *bridgeto,
+										  uint32_t timeout,
+										  char *cid_name,
+										  char *cid_num)
 {
 	switch_core_session_t *peer_session;
-	switch_caller_profile_t *caller_profile, *caller_caller_profile;
-	char *chan_type, *chan_data;
-	unsigned int timelimit = 60;
 	switch_channel_t *peer_channel;
-	time_t start;
-	switch_frame_t *read_frame = NULL;
 	switch_status_t status = SWITCH_STATUS_SUCCESS;
 	switch_channel_t *caller_channel = NULL;
 
-	chan_type = strdup(bridgeto);
-		
-	if ((chan_data = strchr(chan_type, '/')) != 0) {
-		*chan_data = '\0';
-		chan_data++;
-	}
-	
-	if (session) {
-		caller_channel = switch_core_session_get_channel(session);
-		assert(caller_channel != NULL);
-		caller_caller_profile = switch_channel_get_caller_profile(caller_channel);
 
-		if (!cid_name) {
-			cid_name = caller_caller_profile->caller_id_name;
-		}
-
-		if (!cid_num) {
-			cid_num = caller_caller_profile->caller_id_number;
-		}
-		
-		caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
-												   caller_caller_profile->username,
-												   caller_caller_profile->dialplan,
-												   cid_name,
-												   cid_num,
-												   caller_caller_profile->network_addr, 
-												   NULL, 
-												   NULL, 
-												   caller_caller_profile->rdnis,
-												   caller_caller_profile->source,
-												   caller_caller_profile->context,
-												   chan_data);
-	} else {
-
-		if (!cid_name) {
-			cid_name = conference->caller_id_name;
-		}
-
-		if (!cid_num) {
-			cid_num = conference->caller_id_number;
-		}
-
-		caller_profile = switch_caller_profile_new(conference->pool,
-												   NULL,
-												   NULL,
-												   cid_name,
-												   cid_num,
-												   NULL,
-												   NULL, 
-												   NULL, 
-												   NULL,
-												   (char *) global_app_name,
-												   NULL,
-												   chan_data);
-	}
-
-
-
-	if (switch_core_session_outgoing_channel(session, chan_type, caller_profile, &peer_session, NULL) !=
-		SWITCH_STATUS_SUCCESS) {
+	if (switch_ivr_originate(session, &peer_session, bridgeto, timeout, &audio_bridge_peer_state_handlers, cid_name, cid_num, NULL) != SWITCH_STATUS_SUCCESS) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
-		if (caller_channel) {
+		if (session) {
+			caller_channel = switch_core_session_get_channel(session);
 			switch_channel_hangup(caller_channel, SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL);
 		}
-		status = SWITCH_STATUS_FALSE;
 		goto done;
 	} 
 
+
 	peer_channel = switch_core_session_get_channel(peer_session);
 	assert(peer_channel != NULL);
-		
-	switch_channel_add_state_handler(peer_channel, &audio_bridge_peer_state_handlers);
-
-	if (switch_core_session_runing(peer_session)) {
-		switch_channel_set_state(peer_channel, CS_RING);
-	} else {
-		switch_core_session_thread_launch(peer_session);
-	}
-
-	time(&start);
-
-	for (;;) {
-		int state = switch_channel_get_state(peer_channel);
-		if (state >= CS_RING) {
-			break;
-		}
-		
-		if (caller_channel && !switch_channel_ready(caller_channel)) {
-			break;
-		}
-		
-		if ((time(NULL) - start) > (time_t)timelimit) {
-			break;
-		}
-		switch_yield(1000);
-	}
-
-	if (caller_channel) {
-		switch_channel_pre_answer(caller_channel);
-	}
-
-	while ((!caller_channel || switch_channel_ready(caller_channel)) &&
-		   !switch_channel_test_flag(peer_channel, CF_ANSWERED) &&
-		   !switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA) &&
-		   ((time(NULL) - start) < (time_t)timelimit)) {
-		
-		/* read from the channel while we wait if the audio is up on it */
-		if (session && (switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA))) {
-			switch_status_t status = switch_core_session_read_frame(session, &read_frame, 1000, 0);
-			
-			if (!SWITCH_READ_ACCEPTABLE(status)) {
-				break;
-			}
-			if (read_frame) {
-				if (switch_core_session_write_frame(session, read_frame, 1000, 0) != SWITCH_STATUS_SUCCESS) {
-					break;
-				}
-			}
-
-		} else {
-			switch_yield(1000);
-		}
-
-	}
-
+	
 	if (caller_channel && switch_channel_test_flag(peer_channel, CF_ANSWERED)) {
 		switch_channel_answer(caller_channel);
 	}
 
 	if (switch_channel_test_flag(peer_channel, CF_ANSWERED) || switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA)) {
 		switch_caller_extension_t *extension = NULL;
-		if ((extension = switch_caller_extension_new(peer_session, caller_profile->destination_number,
-													 caller_profile->destination_number)) == 0) {
+		if ((extension = switch_caller_extension_new(peer_session, conference->name, conference->name)) == 0) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "memory error!\n");
 			status = SWITCH_STATUS_MEMERR;
 			goto done;
@@ -2127,7 +2078,6 @@
 	}
 
  done:
-	free(chan_type);
 	return status;
 }
 
@@ -2171,6 +2121,9 @@
 	switch_xml_t cxml = NULL, cfg = NULL, profile = NULL, profiles = NULL;
 	char *flags_str;
 	member_flag_t uflags = MFLAG_CAN_SPEAK | MFLAG_CAN_HEAR;
+	switch_core_session_message_t msg = {0};
+	uint8_t isbr = 0;
+	char *dpin = NULL;
 	
 	channel = switch_core_session_get_channel(session);
     assert(channel != NULL);
@@ -2204,32 +2157,39 @@
 	}
 
 	if (!strncasecmp(mydata, bridge_prefix, strlen(bridge_prefix))) {
-		char *uuid = switch_core_session_get_uuid(session);
-		
+		isbr = 1;
 		mydata += strlen(bridge_prefix);
-		conf_name = mydata;
-
-		if ((bridgeto = strchr(conf_name, ':'))) {
+		if ((bridgeto = strchr(mydata, ':'))) {
 			*bridgeto++ = '\0';
 		} else {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Config Error!\n");
 			goto done;
 		}
+	}
 
-		if ((profile_name = strchr(conf_name, '@'))) {
-			*profile_name++ = '\0';
+	conf_name = mydata;
 
-			/* Open the config from the xml registry */
-			if (!(cxml = switch_xml_open_cfg(global_cf_name, &cfg, NULL))) {
-				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", global_cf_name);
-				goto done;
-			}
-			
-			if ((profiles = switch_xml_child(cfg, "profiles"))) {
-				profile = switch_xml_find_child(profiles, "profile", "name", profile_name);
-			}
+	if ((dpin = strchr(conf_name, '+'))) {
+		*dpin++ = '\0';
+	}
+
+	if ((profile_name = strchr(conf_name, '@'))) {
+		*profile_name++ = '\0';
+
+		/* Open the config from the xml registry */
+		if (!(cxml = switch_xml_open_cfg(global_cf_name, &cfg, NULL))) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", global_cf_name);
+			goto done;
 		}
+		
+		if ((profiles = switch_xml_child(cfg, "profiles"))) {
+			profile = switch_xml_find_child(profiles, "profile", "name", profile_name);
+		}
+	} 
 
+	if (isbr) {
+		char *uuid = switch_core_session_get_uuid(session);
+		
 		if (!strcmp(conf_name, "_uuid_")) {
 			conf_name = uuid;
 		}
@@ -2242,10 +2202,6 @@
 		/* Create the conference object. */
 		conference = conference_new(conf_name, profile, pool);
 
-		/* Release the config registry handle */
-		switch_xml_free(cxml);
-		cxml = NULL;
-
 		if (!conference) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
 			goto done;
@@ -2254,6 +2210,10 @@
 		/* Set the minimum number of members (once you go above it you cannot go below it) */
 		conference->min = 2;
 
+		if (dpin) {
+			conference->pin = switch_core_strdup(conference->pool, dpin);
+		}
+
 		/* Indicate the conference is dynamic */
 		switch_set_flag_locked(conference, CFLAG_DYNAMIC);	
 
@@ -2261,12 +2221,32 @@
 		launch_conference_thread(conference);
 
 	} else {
-		conf_name = mydata;
-		freepool = pool;
 		/* Figure out what conference to call. */
-		if (!(conference = (conference_obj_t *) switch_core_hash_find(globals.conference_hash, conf_name))) {
-			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No Conference called %s found.\n", conf_name);
-			goto done;
+		if ((conference = (conference_obj_t *) switch_core_hash_find(globals.conference_hash, conf_name))) {
+			freepool = pool;
+		} else {
+			/* Create the conference object. */
+			conference = conference_new(conf_name, profile, pool);
+		
+
+			if (!conference) {
+				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
+				goto done;
+			}
+			
+			if (dpin) {
+				conference->pin = switch_core_strdup(conference->pool, dpin);
+			}
+				
+			/* Set the minimum number of members (once you go above it you cannot go below it) */
+			conference->min = 1;
+
+			/* Indicate the conference is dynamic */
+			switch_set_flag_locked(conference, CFLAG_DYNAMIC);
+
+			/* Start the conference thread for this conference */
+			launch_conference_thread(conference);
+
 		}
 
 		if (conference->pin) {
@@ -2279,11 +2259,15 @@
 
 			if (conference->pin_sound) {
 				conference_local_play_file(session, conference->pin_sound, 20, pin, sizeof(pin));
-			}
+			} 
 
 			if (strlen(pin) < strlen(conference->pin)) {
 				buf = pin + strlen(pin);
-				switch_ivr_collect_digits_count(session, buf, sizeof(pin) - (unsigned int)strlen(pin), (unsigned int)strlen(conference->pin) - (unsigned int)strlen(pin), "#", &term, 10000);
+				switch_ivr_collect_digits_count(session,
+												buf,
+												sizeof(pin) - (unsigned int)strlen(pin),
+												(unsigned int)strlen(conference->pin) - (unsigned int)strlen(pin),
+												"#", &term, 10000);
 			}
 
 			if (strcmp(pin, conference->pin)) {
@@ -2306,8 +2290,15 @@
 		
 	}
 
-	if (bridgeto) {
-		if (conference_outcall(conference, session, bridgeto, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
+	/* Release the config registry handle */
+	if (cxml) {
+		switch_xml_free(cxml);
+		cxml = NULL;
+	}
+
+
+	if (!switch_strlen_zero(bridgeto) && strcasecmp(bridgeto, "none")) {
+		if (conference_outcall(conference, session, bridgeto, 60, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
 			goto done;
 		}
 	}
@@ -2404,9 +2395,19 @@
 	}
 	switch_set_flag_locked((&member), MFLAG_RUNNING | uflags);
 
+	msg.from = __FILE__;
+
+	/* Tell the channel we are going to be in a bridge */
+	msg.message_id = SWITCH_MESSAGE_INDICATE_BRIDGE;
+	switch_core_session_receive_message(session, &msg);
+
 	/* Run the confernece loop */
 	conference_loop(&member);
 
+	/* Tell the channel we are no longer going to be in a bridge */
+	msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
+	switch_core_session_receive_message(session, &msg);
+
 	/* Remove the caller from the conference */
 	conference_del_member(member.last_conference, &member);
 
@@ -2844,8 +2845,6 @@
 /* Called by FreeSWITCH when the module loads */
 SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
 {
-	switch_xml_t cfg, cxml, room, rooms, profiles, profile = NULL;
-	conference_obj_t *conference;
 	switch_status_t status = SWITCH_STATUS_SUCCESS;
 	
 	memset(&globals, 0, sizeof(globals));
@@ -2864,39 +2863,28 @@
 		return SWITCH_STATUS_TERM;
 	}
 
-	/* Open the config from the xml registry */
-	if (!(cxml = switch_xml_open_cfg(global_cf_name, &cfg, NULL))) {
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", global_cf_name);
-        return SWITCH_STATUS_TERM;
-    }
-
 	/* Setup a hash to store conferences by name */
 	switch_core_hash_init(&globals.conference_hash, globals.conference_pool);
 	switch_mutex_init(&globals.conference_mutex, SWITCH_MUTEX_NESTED, globals.conference_pool);
 	switch_mutex_init(&globals.id_mutex, SWITCH_MUTEX_NESTED, globals.conference_pool);
 	switch_mutex_init(&globals.hash_mutex, SWITCH_MUTEX_NESTED, globals.conference_pool);
 
-	/* Itterate the config */
-	if ((rooms = switch_xml_child(cfg, "rooms"))) {
-		/* Parse various rooms. */
-		for (room = switch_xml_child(rooms, "room"); room; room = room->next) {
-			char *name = (char *) switch_xml_attr_soft(room, "name");
-			char *pname = (char *) switch_xml_attr_soft(room, "profile");
-			
-			if ((profiles = switch_xml_child(cfg, "profiles"))) {
-				profile = switch_xml_find_child(profiles, "profile", "name", pname);
-			}
+	globals.running = 1;
+	/* indicate that the module should continue to be loaded */
+	return status;
+}
 
-			if ((conference = conference_new(name, profile, NULL))) {
-				/* Start the conference thread for this conference */
-				launch_conference_thread(conference);
-			}
+
+SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
+{
+
+
+	if (globals.running) {
+		globals.running = 0;
+		while (globals.threads) {
+			switch_yield(100000);
 		}
 	}
-	
-	/* Release the config registry handle */
-	switch_xml_free(cxml);
 
-	/* indicate that the module should continue to be loaded */
-	return status;
+	return SWITCH_STATUS_SUCCESS;
 }

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_conference/mod_conference.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_conference/mod_conference.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_conference/mod_conference.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_conference.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_conference.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_conference.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_conference.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_dptools/mod_dptools.c	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_dptools/mod_dptools.c	Sun Aug 27 11:43:21 2006
@@ -45,6 +45,14 @@
 	}
 }
 
+static void answer_function(switch_core_session_t *session, char *data)
+{
+	switch_channel_t *channel;
+	channel = switch_core_session_get_channel(session);
+    assert(channel != NULL);
+	switch_channel_answer(channel);
+}
+
 static void set_function(switch_core_session_t *session, char *data)
 {
 	switch_channel_t *channel;
@@ -118,11 +126,19 @@
 	/*.application_function */ set_function
 };
 
+static const switch_application_interface_t answer_application_interface = {
+	/*.interface_name */ "answer",
+	/*.application_function */ answer_function,
+	NULL,NULL,NULL,
+	&set_application_interface
+
+};
+
 static const switch_application_interface_t strftime_application_interface = {
 	/*.interface_name */ "strftime",
 	/*.application_function */ strftime_function,
 	NULL,NULL,NULL,
-	&set_application_interface
+	&answer_application_interface
 
 };
 

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_dptools/mod_dptools.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_dptools/mod_dptools.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_dptools/mod_dptools.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_dptools.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_dptools.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_dptools.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_dptools.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_echo/mod_echo.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_echo/mod_echo.c	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_echo/mod_echo.c	Sun Aug 27 11:43:21 2006
@@ -24,7 +24,7 @@
  * Contributor(s):
  * 
  * Anthony Minessale II <anthmct at yahoo.com>
- *
+ * Brian K. West <brian.west at mac.com>
  *
  * mod_echo.c -- Echo application
  *

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_echo/mod_echo.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_echo/mod_echo.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_echo/mod_echo.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_echo.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_echo.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_echo.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_echo.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_ivrtest/mod_ivrtest.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_ivrtest/mod_ivrtest.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_ivrtest/mod_ivrtest.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_ivrtest.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_ivrtest.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_ivrtest.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_ivrtest.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_playback/mod_playback.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_playback/mod_playback.c	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_playback/mod_playback.c	Sun Aug 27 11:43:21 2006
@@ -91,7 +91,7 @@
 		switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 	}
 
-	switch_channel_answer(channel);
+	switch_channel_pre_answer(channel);
 	switch_ivr_speak_text(session, engine, voice, timer_name, codec->implementation->samples_per_second, on_dtmf, text, buf, sizeof(buf));
 	
 }
@@ -111,7 +111,7 @@
 	channel = switch_core_session_get_channel(session);
     assert(channel != NULL);
 
-	switch_channel_answer(channel);
+	switch_channel_pre_answer(channel);
 
 	if (switch_ivr_play_file(session, NULL, file_name, timer_name, on_dtmf, NULL, 0) != SWITCH_STATUS_SUCCESS) {
 		switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_playback/mod_playback.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_playback/mod_playback.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_playback/mod_playback.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_playback.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_playback.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_playback.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_playback.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/applications/mod_rss/mod_rss.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/applications/mod_rss/mod_rss.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/applications/mod_rss/mod_rss.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_rss.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_rss.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_rss.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_rss.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/asr_tts/mod_cepstral/mod_cepstral.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/asr_tts/mod_cepstral/mod_cepstral.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/asr_tts/mod_cepstral/mod_cepstral.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -65,11 +65,11 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="swift.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_cepstral.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="C:\Program Files\Cepstral\sdk\lib\winnt;..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_cepstral.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_cepstral.lib"
 				TargetMachine="1"
@@ -101,8 +101,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -146,10 +146,11 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="swift.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_cepstral.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="C:\Program Files\Cepstral\sdk\lib\winnt;..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

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	Sun Aug 27 11:43:21 2006
@@ -207,8 +207,8 @@
 	/*.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,
@@ -248,6 +248,7 @@
 	/*.destroy */ switch_g711u_destroy,
 	/*.next */ &g711u_8k_30ms_implementation
 };
+#endif
 
 static const switch_codec_implementation_t g711u_8k_implementation = {
 	/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
@@ -266,7 +267,7 @@
 	/*.encode */ switch_g711u_encode,
 	/*.decode */ switch_g711u_decode,
 	/*.destroy */ switch_g711u_destroy,
-	/*.next */ &g711u_16k_implementation
+	///*.next */ &g711u_16k_implementation
 };
 
 

Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_g711/mod_g711.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_g711/mod_g711.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_g711/mod_g711.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_g711.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_g711.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_g711.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -141,10 +141,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_g711.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

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	Sun Aug 27 11:43:21 2006
@@ -32,7 +32,7 @@
 #include "switch.h"
 #include "g729.h"
 
-static const char modname[] = "mod_codec_g729";
+static const char modname[] = "mod_g729";
 
 
 struct g729_context {

Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_g729/mod_g729.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_g729/mod_g729.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_g729/mod_g729.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -65,11 +65,11 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="libg729.lib FreeSwitchCore.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_g729.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_g729.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_g729.lib"
 				TargetMachine="1"
@@ -101,8 +101,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -145,10 +145,11 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="libg729.lib FreeSwitchCore.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_g729.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

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	Sun Aug 27 11:43:21 2006
@@ -31,7 +31,7 @@
  */  
 #include "switch.h"
 #include "gsm.h"
-static const char modname[] = "mod_codec_gsm";
+static const char modname[] = "mod_gsm";
 struct gsm_context {
 	gsm encoder;
 	gsm decoder;

Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_gsm/mod_gsm.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_gsm/mod_gsm.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_gsm/mod_gsm.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,15 +17,15 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_CodecGSM Debug"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -64,12 +64,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="libgsm.lib FreeSwitchCore.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_gsm.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\libs\codec\gsm\$(OutDir);..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_gsm.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_gsm.lib"
 				TargetMachine="1"
@@ -101,15 +100,15 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_CodecGSM Release"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -144,11 +143,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="libgsm.lib FreeSwitchCore.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_gsm.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\libs\codec\gsm\$(OutDir);..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_ilbc/mod_ilbc.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_ilbc/mod_ilbc.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_ilbc/mod_ilbc.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,15 +17,15 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_ilbc Debug"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -50,7 +50,7 @@
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,12 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="libilbc.lib FreeSwitchCore.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_ilbc.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\libs\codec\ilbc\$(OutDir);..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_ilbc.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_ilbc.lib"
 				TargetMachine="1"
@@ -100,15 +99,15 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_ilbc Release"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -143,11 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="libilbc.lib FreeSwitchCore.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_ilbc.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\libs\codec\ilbc\$(OutDir);..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_l16/mod_l16.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_l16/mod_l16.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_l16/mod_l16.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -64,12 +64,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="libresampled.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_l16.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\..\..\libs\libresample\win&quot;;..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_l16.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_l16.lib"
 				TargetMachine="1"
@@ -101,8 +100,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -144,11 +143,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="libresample.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_l16.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\..\..\libs\libresample\win&quot;;..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_speex/Makefile
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_speex/Makefile	(original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_speex/Makefile	Sun Aug 27 11:43:21 2006
@@ -1,7 +1,7 @@
 all:	depends $(MODNAME).$(DYNAMIC_LIB_EXTEN)
 
 depends:
-	MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install speex-1.1.11.1.tar.gz --prefix=$(PREFIX)
+	MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install speex-1.1.12.tar.gz --prefix=$(PREFIX) --disable-shared --with-pic
 
 $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c
 	$(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o

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	Sun Aug 27 11:43:21 2006
@@ -33,7 +33,7 @@
 #include <speex/speex.h>
 #include <speex/speex_preprocess.h>
 
-static const char modname[] = "mod_speexcodec";
+static const char modname[] = "mod_speex";
 
 static const switch_codec_settings_t default_codec_settings = {
 	/*.quality */ 5,
@@ -205,6 +205,7 @@
 	speex_bits_pack(&context->encoder_bits, 15, 5);
 	*encoded_data_len = speex_bits_write(&context->encoder_bits, (char *) encoded_data, context->encoder_frame_size);
 	speex_bits_reset(&context->encoder_bits);
+	(*encoded_data_len)--;
 
 	return SWITCH_STATUS_SUCCESS;
 }
@@ -271,7 +272,7 @@
 	/*.ianacode */ 102,
 	/*.iananame */ "speex",
 	/*.samples_per_second */ 32000,
-	/*.bits_per_second */ 512000,
+	/*.bits_per_second */ 256000,
 	/*.nanoseconds_per_frame */ 20000,
 	/*.samples_per_frame */ 640,
 	/*.bytes_per_frame */ 1280,
@@ -287,10 +288,10 @@
 
 static const switch_codec_implementation_t speex_16k_implementation = {
 	/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
-	/*.ianacode */ 100,
+	/*.ianacode */ 99,
 	/*.iananame */ "speex",
 	/*.samples_per_second */ 16000,
-	/*.bits_per_second */ 256000,
+	/*.bits_per_second */ 22000,
 	/*.nanoseconds_per_frame */ 20000,
 	/*.samples_per_frame */ 320,
 	/*.bytes_per_frame */ 640,
@@ -307,10 +308,10 @@
 
 static const switch_codec_implementation_t speex_8k_implementation = {
 	/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
-	/*.ianacode */ 97,
+	/*.ianacode */ 98,
 	/*.iananame */ "speex",
 	/*.samples_per_second */ 8000,
-	/*.bits_per_second */ 128000,
+	/*.bits_per_second */ 11000,
 	/*.nanoseconds_per_frame */ 20000,
 	/*.samples_per_frame */ 160,
 	/*.bytes_per_frame */ 320,

Modified: freeswitch/branches/mishehu/src/mod/codecs/mod_speex/mod_speex.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/codecs/mod_speex/mod_speex.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/codecs/mod_speex/mod_speex.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,15 +17,15 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_SpeexCodec Debug"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\speex\include&quot;;&quot;$(InputDir)..\..\..\..\libs\speex\include\speex&quot;"
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\speex-1.1.11.1\include&quot;;&quot;$(InputDir)..\..\..\..\libs\speex-1.1.11.1\include\speex&quot;"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -64,12 +64,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="libspeex.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_speex.dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="$(InputDir)..\..\..\..\libs\speex\win32\libspeex\$(OutDir);..\..\..\..\w32\vsnet\$(OutDir)"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(InputDir)..\..\..\..\libs\speex-1.1.11.1\win32\libspeex\$(OutDir);..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_speex.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_speex.lib"
 				TargetMachine="1"
@@ -101,15 +100,15 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_SpeexCodec Release"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -125,7 +124,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\speex\include&quot;;&quot;$(InputDir)..\..\..\..\libs\speex\include\speex&quot;"
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\speex-1.1.11.1\include&quot;;&quot;$(InputDir)..\..\..\..\libs\speex-1.1.11.1\include\speex&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
 				RuntimeLibrary="0"
 				UsePrecompiledHeader="0"
@@ -144,11 +143,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="libspeex.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_speex.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(InputDir)..\..\..\..\libs\speex\win32\libspeex\$(OutDir);..\..\..\..\w32\vsnet\$(OutDir)"
+				AdditionalLibraryDirectories="$(InputDir)..\..\..\..\libs\speex-1.1.11.1\win32\libspeex\$(OutDir);..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_dialplan_directory.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_dialplan_directory.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_dialplan_directory.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -141,10 +141,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_dialplan_directory.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,15 +17,15 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_dialplan_xml Debug"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -64,12 +64,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="libpcre.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_dialplan_xml.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;..\..\..\..\w32\vsnet\$(OutDir)&quot;"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_dialplan_xml.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_dialplan_xml.lib"
 				TargetMachine="1"
@@ -101,15 +100,15 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_dialplan_xml Release"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -144,11 +143,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="libpcre.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_dialplan_xml.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;..\..\..\..\w32\vsnet\$(OutDir)&quot;"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/directories/mod_ldap/mod_ldap.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/directories/mod_ldap/mod_ldap.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/directories/mod_ldap/mod_ldap.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -65,11 +65,11 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="Ws2_32.lib olber32.lib oldap_r.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_ldap.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="2"
 				AdditionalLibraryDirectories="$(InputDir)..\..\..\..\libs\openldap\$(OutDir);..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_ldap.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_ldap.lib"
 				TargetMachine="1"
@@ -101,8 +101,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -146,10 +146,11 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="Ws2_32.lib olber32.lib oldap_r.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_ldap.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="$(InputDir)..\..\..\..\libs\openldap\$(OutDir);..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -183,7 +184,7 @@
 		</Configuration>
 		<Configuration
 			Name="Debug MS-LDAP|Win32"
-			OutputDirectory="$(ConfigurationName)"
+			OutputDirectory="Debug"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
@@ -217,7 +218,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -231,11 +232,11 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="Ws2_32.lib Wldap32.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_ldap.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="$(InputDir)..\..\..\..\libs\openldap\$(OutDir);..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_ldap.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_ldap.lib"
 				TargetMachine="1"
@@ -267,7 +268,7 @@
 		</Configuration>
 		<Configuration
 			Name="Release MS-LDAP|Win32"
-			OutputDirectory="$(ConfigurationName)"
+			OutputDirectory="Release"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
@@ -312,10 +313,11 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="Ws2_32.lib Wldap32.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_ldap.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="$(InputDir)..\..\..\..\libs\openldap\$(OutDir);..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

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	Sun Aug 27 11:43:21 2006
@@ -65,7 +65,9 @@
 	TFLAG_LANADDR = (1 << 16),
 	TFLAG_AUTO = (1 << 17),
 	TFLAG_DTMF = (1 << 18),
-	TFLAG_TIMER = ( 1 << 19)
+	TFLAG_TIMER = ( 1 << 19),
+	TFLAG_TERM = ( 1 << 20),
+	TFLAG_TRANSPORT_ACCEPT = (1 << 21),
 } TFLAGS;
 
 typedef enum {
@@ -134,6 +136,8 @@
 	uint32_t last_read;
 	char *codec_name;
 	switch_payload_t codec_num;
+	switch_payload_t r_codec_num;
+	uint32_t codec_rate;
 	switch_time_t next_desc;
 	switch_time_t next_cand;
 	char *stun_ip;
@@ -171,6 +175,41 @@
 static ldl_status handle_response(ldl_handle_t *handle, char *id);
 static switch_status_t load_config(void);
 
+
+static void terminate_session(switch_core_session_t **session, switch_call_cause_t cause)
+{
+	if (*session) {
+		switch_channel_t *channel = switch_core_session_get_channel(*session);
+		switch_channel_state_t state = switch_channel_get_state(channel);
+		struct private_object *tech_pvt = NULL;
+			
+		tech_pvt = switch_core_session_get_private(*session);
+
+		if (tech_pvt && tech_pvt->dlsession) {
+			if (!switch_test_flag(tech_pvt, TFLAG_TERM)) {
+				ldl_session_terminate(tech_pvt->dlsession);
+				switch_set_flag_locked(tech_pvt, TFLAG_TERM);
+			}
+			ldl_session_destroy(&tech_pvt->dlsession);
+		}
+
+		if (state > CS_INIT && state < CS_HANGUP) {
+			switch_channel_hangup(channel, cause);
+		}
+		
+		if (!switch_core_session_runing(*session)) {
+			if (state > CS_INIT && state < CS_HANGUP) {
+				channel_on_hangup(*session);
+			}
+
+			if (tech_pvt && tech_pvt->dlsession) {
+				ldl_session_set_private(tech_pvt->dlsession, NULL);
+			}
+			switch_core_session_destroy(session);
+		}
+	}
+}
+
 static void dl_logger(char *file, const char *func, int line, int level, char *fmt, ...)
 {
 	va_list ap;
@@ -184,24 +223,28 @@
 	va_end(ap);
 }
 
-static void get_codecs(struct private_object *tech_pvt)
+static int get_codecs(struct private_object *tech_pvt)
 {
 	assert(tech_pvt != NULL);
 	assert(tech_pvt->session != NULL);
 
-	if (globals.codec_string) {
-		if ((tech_pvt->num_codecs = switch_loadable_module_get_codecs_sorted(tech_pvt->codecs,
-																			 SWITCH_MAX_CODECS,
-																			 globals.codec_order,
-																			 globals.codec_order_last)) <= 0) {
+	if (!tech_pvt->num_codecs) {
+		if (globals.codec_string) {
+			if ((tech_pvt->num_codecs = switch_loadable_module_get_codecs_sorted(tech_pvt->codecs,
+																				 SWITCH_MAX_CODECS,
+																				 globals.codec_order,
+																				 globals.codec_order_last)) <= 0) {
+				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO codecs?\n");
+				return 0;
+			}
+		} else if (((tech_pvt->num_codecs =
+					 switch_loadable_module_get_codecs(switch_core_session_get_pool(tech_pvt->session), tech_pvt->codecs, SWITCH_MAX_CODECS))) <= 0) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO codecs?\n");
-			return;
+			return 0;
 		}
-	} else if (((tech_pvt->num_codecs =
-				 switch_loadable_module_get_codecs(switch_core_session_get_pool(tech_pvt->session), tech_pvt->codecs, SWITCH_MAX_CODECS))) <= 0) {
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO codecs?\n");
-		return;
 	}
+
+	return tech_pvt->num_codecs;
 }
 
 
@@ -244,7 +287,7 @@
 	switch_rtp_flag_t flags;
 
 	if (tech_pvt->rtp_session) {
-		return 0;
+		return 1;
 	}
 
 	if (!strncasecmp(tech_pvt->codec_name, "ilbc", 4)) {
@@ -252,33 +295,35 @@
 	}
 
 	if (switch_core_codec_init(&tech_pvt->read_codec,
-				   tech_pvt->codec_name,
-				   8000,
-				   ms,
-				   1,
-				   SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
-				   NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
+							   tech_pvt->codec_name,
+							   tech_pvt->codec_rate,
+							   ms,
+							   1,
+							   SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
+							   NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't load codec?\n");
 		switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
-		return -1;
+		return 0;
 	}
 	tech_pvt->read_frame.rate = tech_pvt->read_codec.implementation->samples_per_second;
 	tech_pvt->read_frame.codec = &tech_pvt->read_codec;
 
-	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set Read Codec to %s\n", tech_pvt->codec_name);
+	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set Read Codec to %s@%d\n", 
+					  tech_pvt->codec_name, (int)tech_pvt->read_codec.implementation->samples_per_second);
 	
 	if (switch_core_codec_init(&tech_pvt->write_codec,
-				   tech_pvt->codec_name,
-				   8000,
-				   ms,
-				   1,
-				   SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
-				   NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
+							   tech_pvt->codec_name,
+							   tech_pvt->codec_rate,
+							   ms,
+							   1,
+							   SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
+							   NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't load codec?\n");
 		switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
-		return -1;
+		return 0;
 	}
-	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set Write Codec to %s\n",  tech_pvt->codec_name);
+	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set Write Codec to %s@%d\n",  
+					  tech_pvt->codec_name,(int)tech_pvt->write_codec.implementation->samples_per_second);
 							
 	switch_core_session_set_read_codec(tech_pvt->session, &tech_pvt->read_codec);
 	switch_core_session_set_write_codec(tech_pvt->session, &tech_pvt->write_codec);
@@ -287,6 +332,7 @@
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SETUP RTP %s:%d -> %s:%d\n", tech_pvt->profile->ip, tech_pvt->local_port, tech_pvt->remote_ip, tech_pvt->remote_port);
 	
 	flags = SWITCH_RTP_FLAG_GOOGLEHACK | SWITCH_RTP_FLAG_AUTOADJ;
+	//flags = SWITCH_RTP_FLAG_AUTOADJ;
 
 	if (switch_test_flag(tech_pvt->profile, TFLAG_TIMER)) {
 	  flags |= SWITCH_RTP_FLAG_USE_TIMER;
@@ -304,7 +350,7 @@
 												 &err, switch_core_session_get_pool(tech_pvt->session)))) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RTP ERROR %s\n", err);
 		switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
-		return -1;
+		return 0;
 	} else {
 		uint8_t vad_in = switch_test_flag(tech_pvt, TFLAG_VAD_IN) ? 1 : 0;
 		uint8_t vad_out = switch_test_flag(tech_pvt, TFLAG_VAD_OUT) ? 1 : 0;
@@ -316,7 +362,7 @@
 		}
 	}
 
-	return 0;
+	return 1;
 }
 
 
@@ -327,14 +373,12 @@
 	assert(channel != NULL);
 
 	if (switch_test_flag(tech_pvt, TFLAG_DO_CAND)) {
-		return 0;
+		return 1;
 	}
 
-
-
 	tech_pvt->next_cand += DL_CAND_WAIT;
 	if (switch_test_flag(tech_pvt, TFLAG_BYE)) {
-		return -1;
+		return 0;
 	}
 	switch_set_flag_locked(tech_pvt, TFLAG_DO_CAND);
 
@@ -365,7 +409,7 @@
 				if (!stun_ip) {
 					switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! NO STUN SERVER!\n");
 					switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
-					return -1;
+					return 0;
 				}
 
 				cand[0].address = tech_pvt->profile->ip;
@@ -378,7 +422,7 @@
 									   switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
 					switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! %s:%d [%s]\n", stun_ip, SWITCH_STUN_DEFAULT_PORT, err);
 					switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
-					return -1;
+					return 0;
 				}
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Stun Success %s:%d\n", cand[0].address, cand[0].port);
 			}
@@ -399,7 +443,7 @@
 		switch_set_flag_locked(tech_pvt, TFLAG_RTP_READY);
 	}
 	switch_clear_flag_locked(tech_pvt, TFLAG_DO_CAND);
-	return 0;
+	return 1;
 }
 
 static char *lame(char *in)
@@ -414,54 +458,57 @@
 static int do_describe(struct private_object *tech_pvt, int force)
 {
 	ldl_payload_t payloads[5];
-	switch_channel_t *channel = switch_core_session_get_channel(tech_pvt->session);
-	assert(channel != NULL);
+	assert(switch_core_session_get_channel(tech_pvt->session) != NULL);
 
 	if (switch_test_flag(tech_pvt, TFLAG_DO_DESC)) {
-		return 0;
+		return 1;
 	}
 
 	tech_pvt->next_desc += DL_CAND_WAIT;
 
 	if (switch_test_flag(tech_pvt, TFLAG_BYE)) {
-		return -1;
+		return 0;
 	}
 
 	memset(payloads, 0, sizeof(payloads));
 	switch_set_flag_locked(tech_pvt, TFLAG_DO_CAND);
-	if (!tech_pvt->num_codecs) {
-		get_codecs(tech_pvt);
-		if (!tech_pvt->num_codecs) {
-			switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
-			switch_set_flag_locked(tech_pvt, TFLAG_BYE);
-			switch_clear_flag_locked(tech_pvt, TFLAG_IO);
-			return -1;
-		}
+	if (!get_codecs(tech_pvt)) {
+		terminate_session(&tech_pvt->session, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
+		switch_set_flag_locked(tech_pvt, TFLAG_BYE);
+		switch_clear_flag_locked(tech_pvt, TFLAG_IO);
+		return 0;
 	}
 
+
 	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]->iananame);
 			tech_pvt->codec_num = tech_pvt->codecs[0]->ianacode;
+			tech_pvt->codec_rate = tech_pvt->codecs[0]->samples_per_second;
+			tech_pvt->r_codec_num = tech_pvt->codecs[0]->ianacode;
 			tech_pvt->codec_index = 0;
 					
 			payloads[0].name = lame(tech_pvt->codecs[0]->iananame);
 			payloads[0].id = tech_pvt->codecs[0]->ianacode;
+			payloads[0].rate = tech_pvt->codecs[0]->samples_per_second;
+			payloads[0].bps = tech_pvt->codecs[0]->bits_per_second;
 			
 		} else {
 			payloads[0].name = lame(tech_pvt->codecs[tech_pvt->codec_index]->iananame);
 			payloads[0].id = tech_pvt->codecs[tech_pvt->codec_index]->ianacode;
+			payloads[0].rate = tech_pvt->codecs[tech_pvt->codec_index]->samples_per_second;
+			payloads[0].bps = tech_pvt->codecs[tech_pvt->codec_index]->bits_per_second;
 		}
 
 				
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Send Describe [%s]\n", payloads[0].name);
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Send Describe [%s@%d]\n", payloads[0].name, payloads[0].rate);
 		tech_pvt->desc_id = ldl_session_describe(tech_pvt->dlsession, payloads, 1,
 												 switch_test_flag(tech_pvt, TFLAG_OUTBOUND) ? LDL_DESCRIPTION_INITIATE : LDL_DESCRIPTION_ACCEPT);
 		switch_set_flag_locked(tech_pvt, TFLAG_CODEC_READY);
 	} 
 	switch_clear_flag_locked(tech_pvt, TFLAG_DO_CAND);
-	return 0;
+	return 1;
 }
 
 static void *SWITCH_THREAD_FUNC negotiate_thread_run(switch_thread_t *thread, void *obj)
@@ -494,28 +541,29 @@
 	while(! (switch_test_flag(tech_pvt, TFLAG_CODEC_READY) && 
 			 switch_test_flag(tech_pvt, TFLAG_RTP_READY) && 
 			 switch_test_flag(tech_pvt, TFLAG_ANSWER) && 
+			 switch_test_flag(tech_pvt, TFLAG_TRANSPORT_ACCEPT) &&
 			 switch_test_flag(tech_pvt, TFLAG_TRANSPORT))) {
 		now = switch_time_now();
 		elapsed = (unsigned int)((now - started) / 1000);
 
 		if (switch_channel_get_state(channel) >= CS_HANGUP || switch_test_flag(tech_pvt, TFLAG_BYE)) {
-			return NULL;
+			goto out;
 		}
 
 		
 		if (now >= tech_pvt->next_desc) {
-			if (do_describe(tech_pvt, 0) < 0) {
-				break;
+			if (!do_describe(tech_pvt, 0)) {
+				goto out;
 			}
 		}
 		
 		if (tech_pvt->next_cand && now >= tech_pvt->next_cand) {
-			if (do_candidates(tech_pvt, 0) < 0) {
-				break;
+			if (!do_candidates(tech_pvt, 0)) {
+				goto out;
 			}
 		}
 		if (elapsed > 60000) {
-			switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
+			terminate_session(&tech_pvt->session, SWITCH_CAUSE_NORMAL_CLEARING);
 			switch_set_flag_locked(tech_pvt, TFLAG_BYE);
 			switch_clear_flag_locked(tech_pvt, TFLAG_IO);
 			return NULL;
@@ -528,13 +576,17 @@
 	}
 	
 	if (switch_channel_get_state(channel) >= CS_HANGUP || switch_test_flag(tech_pvt, TFLAG_BYE)) {
-		return NULL;
+		goto out;
 	}	
 
-	activate_rtp(tech_pvt);
+	if (!activate_rtp(tech_pvt)) {
+		goto out;
+	}
 	
 	if (switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
-		do_candidates(tech_pvt, 0);
+		if (!do_candidates(tech_pvt, 0)) {
+			goto out;
+		}
 		switch_channel_answer(channel);
 		//printf("***************************ANSWER\n");
 	} else {
@@ -542,6 +594,10 @@
 	}
 	switch_channel_set_state(channel, CS_INIT);
 	return NULL;
+	
+ out:
+	terminate_session(&session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+	return NULL;
 }
 
 
@@ -632,7 +688,10 @@
 	switch_set_flag_locked(tech_pvt, TFLAG_BYE);
 	
 	if (tech_pvt->dlsession) {
-		ldl_session_terminate(tech_pvt->dlsession);
+		if (!switch_test_flag(tech_pvt, TFLAG_TERM)) {
+			ldl_session_terminate(tech_pvt->dlsession);
+			switch_set_flag_locked(tech_pvt, TFLAG_TERM);
+		}
 		ldl_session_destroy(&tech_pvt->dlsession);
 	}
 
@@ -665,13 +724,20 @@
 			switch_clear_flag_locked(tech_pvt, TFLAG_IO);
 			switch_clear_flag_locked(tech_pvt, TFLAG_VOICE);
 			switch_set_flag_locked(tech_pvt, TFLAG_BYE);
-			switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
+
 			if (tech_pvt->dlsession) {
-				ldl_session_terminate(tech_pvt->dlsession);
+				if (!switch_test_flag(tech_pvt, TFLAG_TERM)) {
+					ldl_session_terminate(tech_pvt->dlsession);
+					switch_set_flag_locked(tech_pvt, TFLAG_TERM);
+				}
+				ldl_session_destroy(&tech_pvt->dlsession);
+
 			}
+
 			if (tech_pvt->rtp_session) {
 				switch_rtp_kill_socket(tech_pvt->rtp_session);
 			}
+
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL KILL\n", switch_channel_get_name(channel));
 		}
 	}
@@ -808,7 +874,7 @@
 	switch_clear_flag_locked(tech_pvt, TFLAG_READING);
 
 	if (switch_test_flag(tech_pvt, TFLAG_BYE)) {
-		switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
+		terminate_session(&session, SWITCH_CAUSE_NORMAL_CLEARING);
 		return SWITCH_STATUS_FALSE;
 	}
 
@@ -841,7 +907,7 @@
 
 
 	if (switch_test_flag(tech_pvt, TFLAG_BYE)) {
-		switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
+		terminate_session(&session, SWITCH_CAUSE_NORMAL_CLEARING);
 		return SWITCH_STATUS_FALSE;
 	}
 
@@ -920,6 +986,33 @@
 
 	return SWITCH_STATUS_SUCCESS;
 }
+
+static switch_status_t channel_receive_event(switch_core_session_t *session, switch_event_t *event)
+{
+	switch_channel_t *channel;
+    struct private_object *tech_pvt;
+	char *subject, *body;
+
+    channel = switch_core_session_get_channel(session);
+    assert(channel != NULL);
+
+    tech_pvt = switch_core_session_get_private(session);
+    assert(tech_pvt != NULL);
+
+
+	if (!(body = switch_event_get_body(event))) {
+		body = "";
+	}
+
+	if (!(subject = switch_event_get_header(event, "subject"))) {
+		subject = "None";
+	}
+
+	ldl_session_send_msg(tech_pvt->dlsession, subject, body);
+
+	return SWITCH_STATUS_SUCCESS;
+}
+
 static const switch_state_handler_table_t channel_event_handlers = {
 	/*.on_init */ channel_on_init,
 	/*.on_ring */ channel_on_ring,
@@ -938,7 +1031,8 @@
 	/*.waitfor_read */ channel_waitfor_read,
 	/*.waitfor_write */ channel_waitfor_write,
 	/*.send_dtmf */ channel_send_dtmf,
-	/*.receive_message*/ channel_receive_message
+	/*.receive_message*/ channel_receive_message,
+	/*.receive_event*/ channel_receive_event
 };
 
 static const switch_endpoint_interface_t channel_endpoint_interface = {
@@ -1004,7 +1098,7 @@
 			*callto++ = '\0';
 		} else {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid URL!\n");
-			switch_core_session_destroy(new_session);
+			terminate_session(new_session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 			return SWITCH_STATUS_GENERR;
 		}
 		
@@ -1015,17 +1109,17 @@
 		if ((mdl_profile = switch_core_hash_find(globals.profile_hash, profile_name))) {
 			if (!ldl_handle_ready(mdl_profile->handle)) {
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! we are not logged in yet!\n");
-				switch_core_session_destroy(new_session);
+				terminate_session(new_session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 				return SWITCH_STATUS_GENERR;
 			}
 			if (!(full_id = ldl_handle_probe(mdl_profile->handle, callto, idbuf, sizeof(idbuf)))) {
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Unknown Recipient!\n");
-				switch_core_session_destroy(new_session);
+				terminate_session(new_session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 				return SWITCH_STATUS_GENERR;
 			}
 		} else {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Unknown Profile!\n");
-			switch_core_session_destroy(new_session);
+			terminate_session(new_session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 			return SWITCH_STATUS_GENERR;
 		}
 		
@@ -1045,7 +1139,7 @@
 			tech_pvt->dnis = switch_core_session_strdup(*new_session, dnis);
 		} else {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
-			switch_core_session_destroy(new_session);
+			terminate_session(new_session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 			return SWITCH_STATUS_GENERR;
 		}
 
@@ -1060,7 +1154,7 @@
 			tech_pvt->caller_profile = caller_profile;
 		} else {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! no caller profile\n");
-			switch_core_session_destroy(new_session);
+			terminate_session(new_session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 			return SWITCH_STATUS_GENERR;
 		}
 
@@ -1076,7 +1170,10 @@
 		ldl_session_set_value(dlsession, "caller_id_name", outbound_profile->caller_id_name);
 		ldl_session_set_value(dlsession, "caller_id_number", outbound_profile->caller_id_number);
 		tech_pvt->dlsession = dlsession;
-		get_codecs(tech_pvt);
+		if (!get_codecs(tech_pvt)) {
+			terminate_session(new_session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+            return SWITCH_STATUS_GENERR;
+		}
 		//tech_pvt->desc_id = ldl_session_describe(dlsession, NULL, 0, LDL_DESCRIPTION_INITIATE);
 		negotiate_thread_launch(*new_session);
 		return SWITCH_STATUS_SUCCESS;
@@ -1511,9 +1608,10 @@
 				tech_pvt->local_port = switch_rtp_request_port();
 				switch_set_flag_locked(tech_pvt, TFLAG_ANSWER);
 				tech_pvt->recip = switch_core_session_strdup(session, from);
+				switch_set_flag_locked(tech_pvt, TFLAG_TRANSPORT_ACCEPT);
 			} else {
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
-				switch_core_session_destroy(&session);
+				terminate_session(&session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 				return LDL_STATUS_FALSE;
 			}
 
@@ -1531,7 +1629,9 @@
 			if (*msg == '+') {
 				switch_channel_queue_dtmf(channel, msg + 1);
 				switch_set_flag_locked(tech_pvt, TFLAG_DTMF);
-				switch_rtp_set_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_BREAK);
+				if (tech_pvt->rtp_session) {
+					switch_rtp_set_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_BREAK);
+				}
 			}
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "SESSION MSG [%s]\n", msg);
 		}
@@ -1549,7 +1649,8 @@
 
 		}
 		break;
-
+	case LDL_SIGNAL_TRANSPORT_ACCEPT:
+		switch_set_flag_locked(tech_pvt, TFLAG_TRANSPORT_ACCEPT);
 		break;
 	case LDL_SIGNAL_INITIATE:
 		if (signal) {
@@ -1560,7 +1661,9 @@
 			if (switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
 				if (!strcasecmp(msg, "accept")) {
 					switch_set_flag_locked(tech_pvt, TFLAG_ANSWER);
-					do_candidates(tech_pvt, 0);
+					if (!do_candidates(tech_pvt, 0)) {
+						terminate_session(&session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+					}
 				}
 			}
 
@@ -1569,11 +1672,10 @@
 				break;
 			}
 
-			if (!tech_pvt->num_codecs) {
-				get_codecs(tech_pvt);
-				if (!tech_pvt->num_codecs) {
-					return LDL_STATUS_FALSE;
-				}
+
+			if (!get_codecs(tech_pvt)) {
+				terminate_session(&session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+				return LDL_STATUS_FALSE;
 			}
 
 			
@@ -1594,20 +1696,28 @@
 							match = (payloads[x].id == tech_pvt->codecs[y]->ianacode) ? 1 : 0;
 						}
 						
-						if (match) {
+						if (match && payloads[x].rate == tech_pvt->codecs[y]->samples_per_second) {
 							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]->iananame;
 							tech_pvt->codec_num = tech_pvt->codecs[y]->ianacode;
+							tech_pvt->r_codec_num = (switch_payload_t)(payloads[x].id);
+							tech_pvt->codec_rate = payloads[x].rate;
 							if (!switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
-								do_describe(tech_pvt, 0);
+								if (!do_describe(tech_pvt, 0)) {
+									terminate_session(&session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+									return LDL_STATUS_FALSE;
+								}
 							}
 							return LDL_STATUS_SUCCESS;
 						}
 					}
 				}
 				if (!match && !switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
-					do_describe(tech_pvt, 0);
+					if (!do_describe(tech_pvt, 0)) {
+						terminate_session(&session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+						return LDL_STATUS_FALSE;
+					}
 				}
 			}
 		}
@@ -1663,8 +1773,10 @@
 
 						switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Acceptable Candidate %s:%d\n", candidates[x].address, candidates[x].port);
 
+						if (!switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
+							ldl_session_accept_candidate(dlsession, &candidates[x]);
+						}
 
-
 						if (!(exten = ldl_session_get_value(dlsession, "dnis"))) {
 							exten = profile->exten;
 						}
@@ -1708,21 +1820,26 @@
 							switch_set_flag_locked(tech_pvt, TFLAG_LANADDR);
 						}
 
-						if (!tech_pvt->num_codecs) {
-							get_codecs(tech_pvt);
-							if (!tech_pvt->num_codecs) {
-								return LDL_STATUS_FALSE;
-							}
+						if (!get_codecs(tech_pvt)) {
+							terminate_session(&session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+							return LDL_STATUS_FALSE;
 						}
+
 						
 						tech_pvt->remote_ip = switch_core_session_strdup(session, candidates[x].address);
 						ldl_session_set_ip(dlsession, tech_pvt->remote_ip);
 						tech_pvt->remote_port = candidates[x].port;
 						tech_pvt->remote_user = switch_core_session_strdup(session, candidates[x].username);
+
 						
 						if (!switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
-							do_candidates(tech_pvt, 0);
+							if (!do_candidates(tech_pvt, 0)) {
+								terminate_session(&session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+								return LDL_STATUS_FALSE;
+							}
 						}
+				
+						
 						switch_set_flag_locked(tech_pvt, TFLAG_TRANSPORT);
 						
 						return LDL_STATUS_SUCCESS;
@@ -1737,14 +1854,15 @@
 			switch_channel_state_t state = switch_channel_get_state(channel);
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "hungup %s %u %d\n", switch_channel_get_name(channel), state, CS_INIT);
 			switch_mutex_lock(tech_pvt->flag_mutex);
+			switch_set_flag(tech_pvt, TFLAG_TERM);
 			switch_set_flag(tech_pvt, TFLAG_BYE);
 			switch_clear_flag(tech_pvt, TFLAG_IO);
 			switch_mutex_unlock(tech_pvt->flag_mutex);
-			switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
+			terminate_session(&session, SWITCH_CAUSE_NORMAL_CLEARING);
 
 			if (state <= CS_INIT && !switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Destroy unused Session\n");
-				switch_core_session_destroy(&session);
+				terminate_session(&session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 			} else {
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "End Call\n");
 			}

Modified: freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,15 +17,15 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_Dingaling Debug"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -65,12 +65,12 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalOptions="/NODEFAULTLIB:LIMBCTD"
-				AdditionalDependencies="libdingaling.lib Ws2_32.lib iksemel.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_dingaling.dll"
-				LinkIncremental="2"
+				AdditionalDependencies="Ws2_32.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\..\..\libs\libdingaling\$(OutDir)&quot;;&quot;$(InputDir)..\..\..\..\w32\vsnet\$(OutDir)&quot;;&quot;$(InputDir)..\..\..\..\libs\iksemel\$(OutDir)&quot;"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_dingaling.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_dingaling.lib"
 				TargetMachine="1"
@@ -102,15 +102,15 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_Dingaling Release"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -146,11 +146,12 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="libdingaling.lib Ws2_32.lib iksemel.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_dingaling.dll"
+				AdditionalDependencies="Ws2_32.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\..\..\libs\libdingaling\$(OutDir)&quot;;&quot;$(InputDir)..\..\..\..\w32\vsnet\$(OutDir)&quot;;&quot;$(InputDir)..\..\..\..\libs\iksemel\$(OutDir)&quot;"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

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	Sun Aug 27 11:43:21 2006
@@ -77,7 +77,9 @@
 	TFLAG_VAD_OUT = ( 1 << 13),
 	TFLAG_VAD = ( 1 << 14),
 	TFLAG_TIMER = ( 1 << 15),
-	TFLAG_AA = (1 << 16)
+	TFLAG_AA = (1 << 16),
+	TFLAG_PRE_ANSWER = (1 << 17),
+	TFLAG_REINVITE = (1 << 18)
 } TFLAGS;
 
 
@@ -349,13 +351,7 @@
 		tech_set_codecs(tech_pvt);
 
 
-		sprintf(dbuf, "%u", tech_pvt->te);
-		sdp_message_m_payload_add(tech_pvt->local_sdp, 0, osip_strdup(dbuf));
-		sdp_add_codec(tech_pvt->sdp_config, SWITCH_CODEC_TYPE_AUDIO, tech_pvt->te, "telephone-event", 8000, 0);
-		sprintf(dbuf, "%u telephone-event/8000", tech_pvt->te);
-		sdp_message_a_attribute_add(tech_pvt->local_sdp, 0, "rtpmap", osip_strdup(dbuf));
-		sprintf(dbuf, "%u 0-15", tech_pvt->te);
-		sdp_message_a_attribute_add(tech_pvt->local_sdp, 0, "fmtp", osip_strdup(dbuf));
+
 		
 		if (tech_pvt->num_codecs > 0) {
 			int i, lastcode = -1;
@@ -365,7 +361,7 @@
 			for (i = 0; i < tech_pvt->num_codecs; i++) {
 				imp = tech_pvt->codecs[i];
 
-				while(NULL != imp) {
+				if (imp) {
 					uint32_t sps = imp->samples_per_second;
 
 					if (lastcode != imp->ianacode) {
@@ -381,14 +377,18 @@
 					snprintf(tmp, sizeof(tmp), "%u %s/%d", imp->ianacode, imp->iananame, sps);
 					sdp_message_a_attribute_add(tech_pvt->local_sdp, 0, "rtpmap", osip_strdup(tmp));
 					memset(tmp, 0, sizeof(tmp));
-					if (imp) {
-						imp = imp->next;
-					}
 				} 
 			}
 		}
 
 
+		sprintf(dbuf, "%u", tech_pvt->te);
+		sdp_message_m_payload_add(tech_pvt->local_sdp, 0, osip_strdup(dbuf));
+		sdp_add_codec(tech_pvt->sdp_config, SWITCH_CODEC_TYPE_AUDIO, tech_pvt->te, "telephone-event", 8000, 0);
+		sprintf(dbuf, "%u telephone-event/8000", tech_pvt->te);
+		sdp_message_a_attribute_add(tech_pvt->local_sdp, 0, "rtpmap", osip_strdup(dbuf));
+		sprintf(dbuf, "%u 0-15", tech_pvt->te);
+		sdp_message_a_attribute_add(tech_pvt->local_sdp, 0, "fmtp", osip_strdup(dbuf));
 
 		/* Setup our INVITE */
 		eXosip_lock();
@@ -518,10 +518,13 @@
 	channel = switch_core_session_get_channel(tech_pvt->session);
 	assert(channel != NULL);
 
-	if (tech_pvt->rtp_session) {
+
+	if (tech_pvt->rtp_session && !switch_test_flag(tech_pvt, TFLAG_REINVITE)) {
 		return SWITCH_STATUS_SUCCESS;
 	}
 
+
+
 	if (switch_test_flag(tech_pvt, TFLAG_USING_CODEC)) {
 		bw = tech_pvt->read_codec.implementation->bits_per_second;
 		ms = tech_pvt->read_codec.implementation->microseconds_per_frame;
@@ -557,6 +560,22 @@
 		flags |= SWITCH_RTP_FLAG_AUTOADJ;
 	}
 
+
+	if (tech_pvt->rtp_session && switch_test_flag(tech_pvt, TFLAG_REINVITE)) {
+		switch_clear_flag_locked(tech_pvt, TFLAG_REINVITE);
+		
+		if (switch_rtp_set_remote_address(tech_pvt->rtp_session,
+										  tech_pvt->remote_sdp_audio_ip,
+										  tech_pvt->remote_sdp_audio_port,
+										  &err) != SWITCH_STATUS_SUCCESS) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP REPORTS ERROR: [%s]\n", err);
+		} else {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RTP CHANGING DEST TO: [%s:%d]\n", 
+							  tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port);
+		}
+		return SWITCH_STATUS_SUCCESS;
+	}
+
 	tech_pvt->rtp_session = switch_rtp_new(tech_pvt->local_sdp_audio_ip,
 										   tech_pvt->local_sdp_audio_port,
 										   tech_pvt->remote_sdp_audio_ip,
@@ -1000,11 +1019,13 @@
 static int del_callback(void *pArg, int argc, char **argv, char **columnNames){
 	switch_event_t *s_event;
 
-	if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_EXPIRE) == SWITCH_STATUS_SUCCESS) {
-		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "key", "%s", argv[0]);
-		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "url", "%s", argv[1]);
-		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "expires", "%d", argv[2]);
-		switch_event_fire(&s_event);
+	if (argc >=3 ) {
+		if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_EXPIRE) == SWITCH_STATUS_SUCCESS) {
+			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "key", "%s", argv[0]);
+			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "url", "%s", argv[1]);
+			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "expires", "%d", argv[2]);
+			switch_event_fire(&s_event);
+		}
 	}
 	return 0;
 }
@@ -1215,6 +1236,7 @@
 
 		snprintf(name, sizeof(name), "Exosip/%s-%04x", event->request->from->url->username, rand() & 0xffff);
 		switch_channel_set_name(channel, name);
+		switch_channel_set_variable(channel, "endpoint_disposition", "INVITE");
 
 		if (osip_message_header_get_byname (event->request, "SrtpRealm", 0, &tedious)) {
 			tech_pvt->realm = switch_core_session_strdup(session, osip_header_get_value(tedious));
@@ -1325,7 +1347,7 @@
 			static const switch_codec_implementation_t *imp = NULL;
 
 			for (i = 0; i < tech_pvt->num_codecs; i++) {
-				for (imp = tech_pvt->codecs[i]; imp; imp = imp->next) {
+				if ((imp = tech_pvt->codecs[i])) {
 					sdp_add_codec(tech_pvt->sdp_config,
 								  tech_pvt->codecs[i]->codec_type,
 								  imp->ianacode,
@@ -1498,22 +1520,34 @@
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "destroy %s\n", switch_channel_get_name(channel));
 	exosip_kill_channel(tech_pvt->session, SWITCH_SIG_KILL);
 
+
 	switch (event->type) {
 	case EXOSIP_CALL_RELEASED:
+		switch_channel_set_variable(channel, "endpoint_disposition", "RELEASED");
+		cause = SWITCH_CAUSE_NORMAL_CLEARING;
+		break;
 	case EXOSIP_CALL_CLOSED:
+		switch_channel_set_variable(channel, "endpoint_disposition", "CLOSED");
 		cause = SWITCH_CAUSE_NORMAL_CLEARING;
 		break;
 	case EXOSIP_CALL_NOANSWER:
+		switch_channel_set_variable(channel, "endpoint_disposition", "NO ANSWER");
 		cause = SWITCH_CAUSE_NO_ANSWER;
 		break;
 	case EXOSIP_CALL_REQUESTFAILURE:
+		switch_channel_set_variable(channel, "endpoint_disposition", "REQUEST FAILURE");
 		cause = SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL;
 		break;
 	case EXOSIP_CALL_SERVERFAILURE:
+		switch_channel_set_variable(channel, "endpoint_disposition", "SERVER FAILURE");
+		cause = SWITCH_CAUSE_CALL_REJECTED;
+		break;
 	case EXOSIP_CALL_GLOBALFAILURE:
+		switch_channel_set_variable(channel, "endpoint_disposition", "GLOBAL FAILURE");
 		cause = SWITCH_CAUSE_CALL_REJECTED;
 		break;
 	default:
+		switch_channel_set_variable(channel, "endpoint_disposition", "UNKNOWN");
 		cause = SWITCH_CAUSE_SWITCH_CONGESTION;
 		break;
 	}
@@ -1690,8 +1724,103 @@
 }
 
 
-static void handle_answer(eXosip_event_t * event)
+static int handle_call_transfer(eXosip_event_t *event)
 {
+    osip_message_t *sip = event->request;
+    osip_header_t *refer_hdr;
+	int res;
+
+    if (osip_message_header_get_byname (sip, "Refer-To", 0, &refer_hdr) < 0) {
+		eXosip_call_send_answer(event->tid, 400, NULL);
+		return 0;
+    }
+
+    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,  "Refer: %s\n", refer_hdr->hvalue);
+
+	res = eXosip_call_send_answer(event->tid, 202, NULL);
+    if (res) {
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "message_send_answer info failed! %d\n", event->tid);
+    }
+
+	{
+		osip_from_t *refer = NULL;
+		osip_uri_t *refer_uri = NULL;
+		char *refer_str = NULL;
+		
+		if (osip_from_init(&refer) < 0) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Memory error\n");
+			return -1;
+		}
+
+		if (osip_from_parse(refer, refer_hdr->hvalue) < 0) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Parse error\n");
+			osip_from_free(refer);
+			refer = NULL;
+			return -1;
+		}
+
+		refer_uri = osip_from_get_url (refer);
+
+		if (osip_uri_to_str(refer_uri, &refer_str) < 0) {
+			osip_from_free(refer);
+			return -1;
+		}
+
+		printf("TEST %s\n", refer_str);
+#if 0
+
+		transfer_to = opbx_bridged_channel(p->owner);
+		if (transfer_to) {
+			/* 	    int extout = 0; */
+
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,  "Got SIP blind transfer, applying to '%s'\n", transfer_to->name);
+
+            /* Must release c's lock now, because it will not longer
+			   be accessible after the transfer! */
+			*nounlock = true;
+
+			/* 	    opbx_setstate(transfer_to, OPBX_STATE_RING); */
+			/* 	    hook_channel(transfer_to, NULL); */
+
+			opbx_mutex_unlock(&p->owner->lock);
+			/* 	    opbx_masq_park_call(p->owner, NULL, 0, &extout); */
+
+			/* 	    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,  "Parked to %d\n", extout); */
+
+			opbx_async_goto(transfer_to, p->friend->context, refer_str, 1);
+
+			{
+				osip_message_t *req = NULL;
+				if (eXosip_call_build_notify(event->did,
+											 EXOSIP_SUBCRSTATE_ACTIVE,
+											 &req) < 0) {
+					opbx_log(LOG_WARNING, "eXosip_call_build_notify failed\n");
+				} else {
+					const char sip_frag[] = "SIP/2.0 100 Trying\r\n\r\n";
+					osip_message_set_header(req, osip_strdup("Event"),
+											osip_strdup("refer"));
+					osip_message_set_body(req, sip_frag, strlen(sip_frag));
+					osip_message_set_content_type(req, "message/sipfrag");
+					if (eXosip_call_send_request(event->did, req) < 0) {
+						opbx_log(LOG_WARNING,
+								 "eXosip_call_send_request failed\n");
+					} else {
+						opbx_log(LOG_DEBUG, "Notify ok\n");
+					}
+				}
+			}
+		} else {
+			opbx_log(LOG_WARNING, "No channel up!");
+		}
+#endif
+		osip_free(refer_str);
+		osip_from_free(refer);
+    }
+    return 0;
+}
+
+static void handle_answer(eXosip_event_t *event)
+{
 	osip_message_t *ack = NULL;
 	sdp_message_t *remote_sdp = NULL;
 	sdp_connection_t *conn = NULL;
@@ -1700,32 +1829,78 @@
 	char *dpayload = NULL, *dname = NULL, *drate = NULL;
 	switch_channel_t *channel;
 	const switch_codec_implementation_t *imp = NULL;
+	uint8_t pre_answer = 0, reinvite = 0, isack = 0;
 
+
 	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;
 	}
 
+	if (event->type == EXOSIP_CALL_RINGING) {
+		pre_answer = 1;
+		if (switch_test_flag(tech_pvt, TFLAG_PRE_ANSWER)) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "one pre-answer is enough for call [%d]!\n", event->cid);
+			return;
+		}
+	} else if (event->type == EXOSIP_CALL_REINVITE) {
+		reinvite = 1;
+	} else if (event->type == EXOSIP_CALL_ACK) {
+		isack = 1;
+	}
+
 	channel = switch_core_session_get_channel(tech_pvt->session);
 	assert(channel != NULL);
 
-	if (!event->response) {
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Someone answered... with no SDP information - WTF?!?\n");
-		switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
-		return;
-	}
 
-	/* Get all of the remote SDP elements... stuff */
-	if ((remote_sdp = eXosip_get_sdp_info(event->response)) == 0) {
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cant Find SDP?\n");
-		switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
-		return;
+	if (reinvite || isack) {
+		if ((remote_sdp = eXosip_get_sdp_info(event->request)) == 0) {
+			if (!isack) {
+				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cant Find SDP?\n");
+				switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+			}
+			return;
+		}
+	} else {
+
+		if (!event->response) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Someone answered... with no SDP information - WTF?!?\n");
+			switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+			return;
+		}
+
+
+		/* Get all of the remote SDP elements... stuff */
+		if ((remote_sdp = eXosip_get_sdp_info(event->response)) == 0) {
+			/* Exosip is daft, they send the same event for both 180 and 183 WTF!!*/
+			if (!pre_answer) {
+				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cant Find SDP?\n");
+				switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+			} else {
+				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "I am daft, don't mind me.\n");
+			}
+		
+			return;
+		}
 	}
 
+	switch_channel_set_variable(channel, "endpoint_disposition", "ANSWER");
 
 	conn = eXosip_get_audio_connection(remote_sdp);
 	remote_med = eXosip_get_audio_media(remote_sdp);
 
+	if (!strcmp(conn->c_addr, "0.0.0.0")) {
+		eXosip_lock();
+		eXosip_call_build_ack(event->did, &ack);
+		eXosip_call_send_ack(event->did, ack);
+		eXosip_unlock();
+
+		switch_safe_free(dname);
+		switch_safe_free(drate);
+		switch_safe_free(dpayload);
+		return;
+	}
+	
 	/* Grab IP/port */
 	tech_pvt->remote_sdp_audio_port = (switch_port_t)atoi(remote_med->m_port);
 	snprintf(tech_pvt->remote_sdp_audio_ip, 50, conn->c_addr);
@@ -1738,7 +1913,22 @@
 	/* Assign them thar IDs */
 	tech_pvt->did = event->did;
 	tech_pvt->tid = event->tid;
-	{
+
+	
+	if (switch_test_flag(tech_pvt, TFLAG_USING_CODEC) && strcasecmp(dname, tech_pvt->read_codec.implementation->iananame)) {
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Changing Codec from %s to %s\n", tech_pvt->read_codec.implementation->iananame, dname);
+		switch_core_codec_destroy(&tech_pvt->read_codec);
+		switch_core_codec_destroy(&tech_pvt->write_codec);
+		switch_core_session_reset(tech_pvt->session);
+		switch_clear_flag_locked(tech_pvt, TFLAG_USING_CODEC);
+	}
+
+	if (reinvite || isack) {
+		switch_set_flag_locked(tech_pvt, TFLAG_REINVITE);
+	}
+
+	if (!switch_test_flag(tech_pvt, TFLAG_USING_CODEC)) {
+	
 		int rate = atoi(drate);
 		int ms = globals.codec_ms;
 
@@ -1785,7 +1975,7 @@
 		}
 	}
 
-
+	
 	eXosip_lock();
 	eXosip_call_build_ack(event->did, &ack);
 	eXosip_call_send_ack(event->did, ack);
@@ -1806,11 +1996,18 @@
 	if (switch_test_flag(tech_pvt, TFLAG_RTP)) {
 		channel = switch_core_session_get_channel(tech_pvt->session);
 		assert(channel != NULL);
-		switch_channel_answer(channel);
+		if (pre_answer) {
+			switch_set_flag_locked(tech_pvt, TFLAG_PRE_ANSWER);
+			switch_channel_pre_answer(channel);
+		} else {
+			switch_channel_answer(channel);
+		} 
 	}
 }
 
 
+
+
 static const char *event_names[] = {
       "EXOSIP_REGISTRATION_NEW",         
       "EXOSIP_REGISTRATION_SUCCESS",     
@@ -2171,14 +2368,15 @@
 			break;
 		case EXOSIP_CALL_REINVITE:
 			/* See what the reinvite is about - on hold or whatever */
-			//handle_reinvite(event);
+			handle_answer(event);
 			break;
 		case EXOSIP_CALL_MESSAGE_NEW:
 			if (event->request != NULL && MSG_IS_REFER(event->request)) {
-				//handle_call_transfer(event);
+				handle_call_transfer(event);
 			}
 			break;
 		case EXOSIP_CALL_ACK:
+			handle_answer(event);
 			/* If audio is not flowing and this has SDP - fire it up! */
 			break;
 		case EXOSIP_CALL_ANSWERED:
@@ -2188,7 +2386,7 @@
 			/* This is like a 100 Trying... yeah */
 			break;
 		case EXOSIP_CALL_RINGING:
-			//handle_ringing(event);
+			handle_answer(event);
 			break;
 		case EXOSIP_CALL_REDIRECTED:
 			break;

Modified: freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,15 +17,15 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_Exosip Debug"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -43,7 +43,7 @@
 				Name="VCCLCompilerTool"
 				AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
 				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libs\include;..\..\..\..\libs\libeXosip2\include;..\..\..\..\libs\osip\include;..\..\..\..\libs\osip\src\osipparser2;."
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\libeXosip2-2.2.2\include&quot;;&quot;$(InputDir)..\..\..\..\libs\libosip2-2.2.2\include&quot;;&quot;$(InputDir)..\..\..\..\libs\libosip2-2.2.2\src\osipparser2&quot;;."
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
 				GeneratePreprocessedFile="0"
 				MinimalRebuild="true"
@@ -53,7 +53,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -67,15 +67,15 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalOptions="/NODEFAULTLIB:LIBCMT"
-				AdditionalDependencies="Ws2_32.lib Iphlpapi.lib libcpmt.lib eXosip.lib osipparser2.lib osip2.lib"
+				AdditionalDependencies="Ws2_32.lib Iphlpapi.lib libcpmt.lib"
 				ShowProgress="0"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_exosip.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\..\..\libs\libeXosip2\platform\vsnet\$(OutDir)&quot;;&quot;$(InputDir)..\..\..\..\libs\osip\platform\vsnet\$(OutDir)&quot;;&quot;$(InputDir)..\..\..\..\w32\vsnet\$(OutDir)&quot;"
 				IgnoreAllDefaultLibraries="false"
 				IgnoreDefaultLibraryNames=""
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_exosip.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_exosip.lib"
 				TargetMachine="1"
@@ -107,15 +107,15 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_Exosip Release"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -131,7 +131,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libs\include;..\..\..\..\libs\libeXosip2\include;..\..\..\..\libs\osip\include;..\..\..\..\libs\osip\src\osipparser2;."
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\libeXosip2-2.2.2\include&quot;;&quot;$(InputDir)..\..\..\..\libs\libosip2-2.2.2\include&quot;;&quot;$(InputDir)..\..\..\..\libs\libosip2-2.2.2\src\osipparser2&quot;;."
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="0"
 				UsePrecompiledHeader="0"
@@ -151,11 +151,12 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib Iphlpapi.lib libcpmt.lib eXosip.lib osipparser2.lib osip2.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_exosip.dll"
+				AdditionalDependencies="Ws2_32.lib Iphlpapi.lib libcpmt.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\..\..\libs\libeXosip2\platform\vsnet\$(OutDir)&quot;;&quot;$(InputDir)..\..\..\..\libs\osip\platform\vsnet\$(OutDir)&quot;;&quot;$(InputDir)..\..\..\..\w32\vsnet\$(OutDir)&quot;"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

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	Sun Aug 27 11:43:21 2006
@@ -934,9 +934,9 @@
 
 		/* Wait for an event. */
 		if ((iaxevent = iax_get_event(0)) == NULL) {
-			switch_yield(1000);
+			switch_yield(100);
 			continue;
-		} else if (iaxevent) {
+		} else {
 			struct private_object *tech_pvt = iax_get_private(iaxevent->session);
 
 			if (globals.debug && iaxevent->etype != IAX_EVENT_VOICE) {

Modified: freeswitch/branches/mishehu/src/mod/endpoints/mod_iax/mod_iax.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/endpoints/mod_iax/mod_iax.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/endpoints/mod_iax/mod_iax.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,15 +17,15 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_iax Debug"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -51,7 +51,8 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4201"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -64,12 +65,12 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib Iphlpapi.lib libiax2.lib Winmm.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_iax.dll"
-				LinkIncremental="2"
+				AdditionalDependencies="Ws2_32.lib Iphlpapi.lib Winmm.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;..\..\..\..\libs\iax\$(OutDir)&quot;;&quot;..\..\..\..\w32\vsnet\$(OutDir)&quot;"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_iax.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_iax.lib"
 				TargetMachine="1"
@@ -101,15 +102,15 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_iax Release"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -133,6 +134,7 @@
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
+				DisableSpecificWarnings="4201"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -145,11 +147,12 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib Iphlpapi.lib libiax2.lib Winmm.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_iax.dll"
+				AdditionalDependencies="Ws2_32.lib Iphlpapi.lib Winmm.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;..\..\..\..\libs\iax\$(OutDir)&quot;;&quot;..\..\..\..\w32\vsnet\$(OutDir)&quot;"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/endpoints/mod_portaudio/mod_PortAudio.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/endpoints/mod_portaudio/mod_PortAudio.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/endpoints/mod_portaudio/mod_PortAudio.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,15 +17,15 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_PortAudio Debug"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\portaudio\pa_common&quot;;&quot;$(InputDir)..\..\..\..\libs\portaudio\pa_win_wmme&quot;"
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\portaudio_v18_1\pa_common&quot;;&quot;$(InputDir)..\..\..\..\libs\portaudio_v18_1\pa_win_wmme&quot;"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -65,12 +65,12 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalOptions="/NODEFAULTLIB:LIMBCTD"
-				AdditionalDependencies="Ws2_32.lib Iphlpapi.lib  PAStaticWMMED.lib Winmm.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_PortAudio.dll"
-				LinkIncremental="2"
+				AdditionalDependencies="Ws2_32.lib Iphlpapi.lib  Winmm.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\..\..\libs\portaudio\winvc\Lib&quot;;..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_PortAudio.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_PortAudio.lib"
 				TargetMachine="1"
@@ -102,15 +102,15 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_PortAudio Release"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -126,7 +126,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\portaudio\pa_common&quot;;&quot;$(InputDir)..\..\..\..\libs\portaudio\pa_win_wmme&quot;"
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\portaudio_v18_1\pa_common&quot;;&quot;$(InputDir)..\..\..\..\libs\portaudio_v18_1\pa_win_wmme&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
 				RuntimeLibrary="0"
 				UsePrecompiledHeader="0"
@@ -146,11 +146,12 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib Iphlpapi.lib  PAStaticWMME.lib Winmm.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_PortAudio.dll"
+				AdditionalDependencies="Ws2_32.lib Iphlpapi.lib Winmm.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\..\..\libs\portaudio\winvc\Lib&quot;;..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/endpoints/mod_woomera/mod_woomera.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/endpoints/mod_woomera/mod_woomera.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/endpoints/mod_woomera/mod_woomera.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_woomera.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_woomera.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_woomera.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_woomera.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp	(original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp	Sun Aug 27 11:43:21 2006
@@ -114,7 +114,8 @@
 		// We still need to check if this is originated or not
 		if(originated == 0)
 		{
-			if (newchannel->callerprofile) {
+			if (newchannel->callerprofile) 
+			{
 				if(newchannel->callerprofile->destination_number != 0)
 					strncpy(src,newchannel->callerprofile->destination_number,strlen(newchannel->callerprofile->destination_number));
 				if(newchannel->callerprofile->caller_id_number != 0)

Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_cdr.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_cdr.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_cdr.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_cdr.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -226,11 +227,11 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="mysqlclient.lib ws2_32.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_cdr.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="2"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\Debug;&quot;C:\Program Files\MySQL\MySQL Server 5.0\lib\debug&quot;"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_cdr.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_cdr.lib"
 				TargetMachine="1"
@@ -306,10 +307,11 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="mysqlclient.lib ws2_32.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_cdr.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;..\..\..\..\w32\vsnet\Release&quot;;&quot;C:\Program Files\MySQL\MySQL Server 5.0\lib\opt&quot;"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Added: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/sqlitecdr.cpp
==============================================================================
--- (empty file)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/sqlitecdr.cpp	Sun Aug 27 11:43:21 2006
@@ -0,0 +1,445 @@
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+ * Copyright 2006, Author: Yossi Neiman 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 Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+ *
+ * The Initial Developer of the Original Code is
+ * Yossi Neiman <freeswitch AT cartissolutions.com>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * 
+ * Yossi Neiman <freeswitch AT cartissolutions.com>
+ *
+ * Description: his C++ header file describes the SqliteCDR class which handles formatting a CDR out to
+ * a SQLite database using prepared statements.
+ *
+ * sqlitecdr.cpp
+ *
+ */
+
+#include <switch.h>
+#include <cstring>
+#include <iostream>
+#include "sqlitecdr.h"
+
+SqliteCDR::SqliteCDR() : BaseCDR()
+{
+
+}
+
+SqliteCDR::SqliteCDR(switch_mod_cdr_newchannel_t *newchannel) : BaseCDR(newchannel)
+{
+	if(newchannel != 0)
+	{
+		if(chanvars_fixed_list.size() > 0)
+			process_channel_variables(chanvars_fixed_list,newchannel->channel);
+		
+		if(chanvars_supp_list.size() > 0)
+			process_channel_variables(chanvars_supp_list,chanvars_fixed_list,newchannel->channel,repeat_fixed_in_supp);
+	}
+}
+
+SqliteCDR::~SqliteCDR()
+{
+
+}
+
+bool SqliteCDR::connectionstate = 0;
+bool SqliteCDR::logchanvars = 0;
+bool SqliteCDR::repeat_fixed_in_supp = 0;
+std::list<std::string> SqliteCDR::chanvars_fixed_list;
+std::list<std::string> SqliteCDR::chanvars_supp_list;
+std::vector<switch_mod_cdr_sql_types_t> SqliteCDR::chanvars_fixed_types;
+bool SqliteCDR::activated = 0;
+char SqliteCDR::sql_query[1024] = "";
+std::string SqliteCDR::tmp_sql_query;
+char SqliteCDR::sql_query_chanvars[100] = "";
+std::string SqliteCDR::db_filename;
+switch_core_db_t* SqliteCDR::db = 0;
+switch_core_db_stmt_t* SqliteCDR::stmt=0;
+switch_core_db_stmt_t* SqliteCDR::stmt_chanvars=0;
+
+void SqliteCDR::connect(switch_xml_t& cfg, switch_xml_t& xml, switch_xml_t& settings, switch_xml_t& param)
+{
+	if(activated)
+		disconnect();
+	
+	activated = 0; // Set it as inactive initially
+	connectionstate = 0; // Initialize it to false to show that we aren't yet connected.
+	
+	int count_config_params = 0;  // Need to make sure all params are set before we load
+	if ((settings = switch_xml_child(cfg, "sqlitecdr"))) 
+	{
+		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 (!strcmp(var, "path"))
+			{
+				if(val != 0)
+				{
+					db_filename = val;
+					db_filename.append(SWITCH_PATH_SEPARATOR);
+					db_filename.append("sqlitecdr.db");
+					count_config_params++;
+				}
+			}
+			else if(!strcmp(var,"chanvars_fixed"))
+			{
+				std::string unparsed;
+				unparsed = val;
+				if(unparsed.size() > 0)
+				{
+					parse_channel_variables_xconfig(unparsed,chanvars_fixed_list,chanvars_fixed_types);
+					//logchanvars=1;
+				}
+			}
+			else if(!strcmp(var,"chanvars_supp"))
+			{
+				if(val != 0)
+				{
+					std::string unparsed = val;
+					bool fixed = 0;
+					logchanvars = 1;
+					parse_channel_variables_xconfig(unparsed,chanvars_supp_list,fixed);
+				}	
+			}
+			else if(!strcmp(var,"chanvars_supp_repeat_fixed"))
+			{
+				if(val != 0)
+				{
+					std::string repeat = val;
+					if(repeat == "Y" || repeat == "y" || repeat == "1")
+						repeat_fixed_in_supp = 1;
+				}
+			}
+		}
+		
+		if (count_config_params==1)
+			activated = 1;
+		else
+			switch_console_printf(SWITCH_CHANNEL_LOG,"You did not specify the minimum parameters for using this module.  You must specify an explicit (complete) path to the location of the database file in order to use SqliteCDR.\n");
+		
+		if(activated)
+		{
+			tmp_sql_query = "INSERT INTO freeswitchcdr  (callstartdate,callanswerdate,callenddate,originated,clid,src,dst,ani,ani2,dialplan,myuuid,destuuid,srcchannel,dstchannel,lastapp,lastdata,billusec,disposition,hangupcause,amaflags";
+			
+			int items_appended = 0;
+			
+			if(chanvars_fixed_list.size() > 0 )
+			{
+				std::list<std::string>::iterator iItr, iEnd;
+				for(iItr = chanvars_fixed_list.begin(), iEnd = chanvars_fixed_list.end(); iItr != iEnd; iItr++)
+				{
+					if(iItr->size() > 0)
+					{
+						tmp_sql_query.append(",");
+						tmp_sql_query.append(*iItr);
+						items_appended++;
+					}
+				}
+			}
+			
+			tmp_sql_query.append(") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?");
+			
+			if(chanvars_fixed_list.size() > 0 )
+			{
+				for(int i = 0; i < items_appended; i++)
+					tmp_sql_query.append(",?");
+			}
+			
+			tmp_sql_query.append(")");
+	
+			char tempsql_query_chanvars[] = "INSERT INTO chanvars (callid,varname,varvalue) VALUES(?,?,?)";
+			memset(sql_query_chanvars,0,100);
+			strncpy(sql_query_chanvars,tempsql_query_chanvars,strlen(tempsql_query_chanvars));
+
+			strncpy(sql_query,tmp_sql_query.c_str(),tmp_sql_query.size());
+			
+			switch_core_db_open(db_filename.c_str());
+		}
+	}
+}
+
+bool SqliteCDR::is_activated()
+{
+	return activated;
+}
+
+void SqliteCDR::tempdump_record()
+{
+
+}
+
+void SqliteCDR::reread_tempdumped_records()
+{
+
+}
+
+
+bool SqliteCDR::process_record()
+{
+	std::list<void*> temp_chanvars_holder; // This is used for any fixed chanvars, as we don't want things out of scope
+	
+	if(chanvars_fixed_list.size() > 0)
+	{
+		switch_size_t i = 0; // temporary variable, i is current spot on the string of types
+		std::list<std::pair<std::string,std::string> >::iterator iItr, iEnd;
+		for(iItr = chanvars_fixed.begin(), iEnd = chanvars_fixed.end(); iItr != iEnd; iItr++)
+		{	
+			switch(chanvars_fixed_types[i])
+			{
+				case CDR_INTEGER: 
+				{
+					int* x = new int;
+					*x = 0;
+					bool* is_null = new bool;
+					*is_null = 0;
+					
+					if(iItr->second.size() > 0)
+					{
+						std::istringstream istring(iItr->second);
+						istring >> *x;
+					}
+					else
+						*is_null = 1;
+					temp_chanvars_holder.push_back(x);
+					temp_chanvars_holder.push_back(is_null);
+					add_parameter(*x,MYSQL_TYPE_LONG,is_null);
+					break;
+				}
+				case CDR_DOUBLE: 
+				{
+					double* x = new double;
+					*x = 0;
+					bool* is_null = new bool;
+					*is_null = 0;
+					if(iItr->second.size() > 0)
+					{
+						std::istringstream istring(iItr->second);
+						istring >> *x;
+					}
+					else
+						*is_null = 1;
+					temp_chanvars_holder.push_back(x);
+					temp_chanvars_holder.push_back(is_null);
+					add_parameter(*x,MYSQL_TYPE_DOUBLE,is_null);
+					break;
+				}
+				case CDR_TINY:
+				{
+					short* x = new short;
+					*x = 0;
+					bool* is_null = new bool;
+					*is_null = 0;
+					if(iItr->second.size() > 0)
+					{
+						std::istringstream istring(iItr->second);
+						istring >> *x;
+					}
+					else
+						*is_null = 1;
+					temp_chanvars_holder.push_back(x);
+					temp_chanvars_holder.push_back(is_null);
+					add_parameter(*x,MYSQL_TYPE_TINY,is_null);
+					break;
+				}
+				case CDR_STRING:
+				case CDR_DECIMAL:
+				{
+					long unsigned int* stringlength = new long unsigned int;
+					*stringlength = (long unsigned int)(iItr->second.size());
+				
+					char* x = new char[(*stringlength+1)];
+					strncpy(x,iItr->second.c_str(),*stringlength);
+					
+					bool* is_null = new bool;
+					*is_null = 0;
+					add_string_parameter(x,*stringlength,MYSQL_TYPE_VAR_STRING,is_null);
+				
+					temp_chanvars_holder.push_back(stringlength);
+					temp_chanvars_holder.push_back(x);
+					temp_chanvars_holder.push_back(is_null);
+					break;
+				}
+				default:
+					switch_console_printf(SWITCH_CHANNEL_LOG,"We should not get to this point in this switch/case statement.\n");
+			}
+			i++;
+		}
+	}
+		
+	MYSQL_BIND *bindmetemp;
+	bindmetemp = new MYSQL_BIND[bindme.size()];
+	copy(bindme.begin(), bindme.end(), bindmetemp);
+	
+	for(int mysql_ping_result = -1, count = 0, mysql_stmt_error_code = -1; mysql_ping_result != 0 && count < 5 && mysql_stmt_error_code != 0 ; count++)
+	{
+		mysql_ping_result = mysql_ping(conn);
+		if(mysql_ping_result)
+		{
+			switch(mysql_ping_result)
+			{
+				case CR_SERVER_GONE_ERROR:
+				case CR_SERVER_LOST:
+				{
+					switch_console_printf(SWITCH_CHANNEL_LOG,"We lost connection to the MySQL server.  Trying to reconnect.\n");
+					connect_to_database();
+					break;
+				}
+				default:
+				{
+					switch_console_printf(SWITCH_CHANNEL_LOG,"We have encountered an unknown error when pinging the MySQL server.  Attempting to reconnect anyways.\n");
+					connect_to_database();
+				}
+			}
+		}
+		else
+		{
+			mysql_stmt_bind_param(stmt,bindmetemp);
+			mysql_stmt_error_code = mysql_stmt_execute(stmt);
+			
+			if(mysql_stmt_error_code != 0)
+			{
+				errorstate = 1;
+				switch_console_printf(SWITCH_CHANNEL_LOG,"MysqlCDR::process_record() - Statement executed? Error: %d\n",mysql_stmt_error_code);
+			
+				const char* mysql_stmt_error_string = mysql_stmt_error(stmt);
+				switch_console_printf(SWITCH_CHANNEL_LOG,"MySQL encountered error: %s\n",mysql_stmt_error_string);
+			}
+			else
+				errorstate = 0;
+			
+			if(logchanvars && chanvars_supp.size() > 0 && errorstate == 0)
+			{
+				long long insertid = mysql_stmt_insert_id(stmt);
+
+				std::map<std::string,std::string>::iterator iItr,iBeg,iEnd;
+				iEnd = chanvars_supp.end();
+				for(iItr = chanvars_supp.begin(); iItr != iEnd; iItr++)
+				{
+					MYSQL_BIND bindme_chanvars[3];
+					memset(bindme_chanvars,0,sizeof(bindme_chanvars));
+			
+					bindme_chanvars[0].buffer_type = MYSQL_TYPE_LONGLONG;
+					bindme_chanvars[0].buffer = &insertid;
+			
+					std::vector<char> tempfirstvector(iItr->first.begin(), iItr->first.end());
+					tempfirstvector.push_back('\0');
+					char* varname_temp = &tempfirstvector[0];
+
+					bindme_chanvars[1].buffer_type = MYSQL_TYPE_VAR_STRING;
+					long unsigned int varname_length = (long unsigned int)(iItr->first.size());
+					bindme_chanvars[1].length = &varname_length;
+					bindme_chanvars[1].buffer_length = varname_length;
+					bindme_chanvars[1].buffer = varname_temp;
+			
+					std::vector<char> tempsecondvector(iItr->second.begin(), iItr->second.end());
+					tempsecondvector.push_back('\0');
+					char* varvalue_temp = &tempsecondvector[0];
+			
+					bindme_chanvars[2].buffer_type = MYSQL_TYPE_VAR_STRING;
+					if(iItr->second.size() == 0)
+						bindme_chanvars[2].is_null = (my_bool*)1;
+					else
+					{
+						long unsigned int varvalue_length = (long unsigned int)(iItr->second.size());
+						bindme_chanvars[2].length = &varvalue_length;
+						bindme_chanvars[2].buffer_length = varvalue_length;
+						bindme_chanvars[2].buffer = varvalue_temp;
+					}
+			
+					mysql_stmt_bind_param(stmt_chanvars,bindme_chanvars);
+					mysql_stmt_execute(stmt_chanvars);
+				}
+			}
+			
+			if(errorstate == 0)
+				mysql_commit(conn);
+			else
+				mysql_rollback(conn);
+		}
+	}
+	
+	delete [] bindmetemp;
+	if(temp_chanvars_holder.size() > 0)
+	{
+		std::string::size_type i = 0, j = chanvars_fixed_types.size();
+		for(; i < j ; i++)
+		{
+			switch(chanvars_fixed_types[i])
+			{
+				case CDR_STRING:
+				case CDR_DECIMAL:
+				{
+					long unsigned int* stringlength = (long unsigned int*)temp_chanvars_holder.front();
+					temp_chanvars_holder.pop_front();
+					delete stringlength;
+					char* tempstring = (char*) temp_chanvars_holder.front();
+					temp_chanvars_holder.pop_front();
+					delete [] tempstring;
+					break;
+				}
+				case CDR_INTEGER:
+				{
+					int* tempint = (int*) temp_chanvars_holder.front();
+					temp_chanvars_holder.pop_front();
+					delete tempint;
+					break;
+				}
+				case CDR_DOUBLE:
+				{
+					double* tempdouble = (double*) temp_chanvars_holder.front();
+					temp_chanvars_holder.pop_front();
+					delete tempdouble;
+					break;
+				}
+				case CDR_TINY:
+				{	
+					short* tempshort = (short*) temp_chanvars_holder.front();
+					temp_chanvars_holder.pop_front();
+					delete tempshort;
+					break;
+				}
+				default:
+					switch_console_printf(SWITCH_CHANNEL_LOG,"We should not get to this point in this switch/case statement.\n");
+			}
+			
+			bool* tempbool = (bool*) temp_chanvars_holder.front();
+			temp_chanvars_holder.pop_front();
+			delete tempbool;
+		}
+	}
+	return 1;
+}
+
+void SqliteCDR::disconnect()
+{
+	switch_core_db_close(db);
+	activated = 0;
+	logchanvars = 0;
+	chanvars_fixed_list.clear();
+	chanvars_supp_list.clear();
+	chanvars_fixed_types.clear();
+	connectionstate = 0;
+	tmp_sql_query.clear();
+}
+
+
+AUTO_REGISTER_BASECDR(SqliteCDR);

Added: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/sqlitecdr.h
==============================================================================
--- (empty file)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/sqlitecdr.h	Sun Aug 27 11:43:21 2006
@@ -0,0 +1,72 @@
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+ * Copyright 2006, Author: Yossi Neiman 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 Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+ *
+ * The Initial Developer of the Original Code is
+ * Yossi Neiman <freeswitch AT cartissolutions.com>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * 
+ * Yossi Neiman <freeswitch AT cartissolutions.com>
+ *
+ * Description: This C++ header file describes the SqliteCDR class which handles formatting a CDR out to
+ * a SQLite database using prepared statements.
+ *
+ * sqlitecdr.h
+ *
+ */
+
+#include "baseregistry.h"
+#include <list>
+#include <sstream>
+
+#ifndef SQLITECDR
+#define SQLITECDR
+
+class SqliteCDR : public BaseCDR {
+	public:
+		SqliteCDR();
+		SqliteCDR(switch_mod_cdr_newchannel_t *newchannel);
+		//SqliteCDR(const SqliteCDR& copyFrom);
+		virtual ~SqliteCDR();
+		virtual bool process_record();
+		virtual void connect(switch_xml_t& cfg, switch_xml_t& xml, switch_xml_t& settings, switch_xml_t& param);
+		virtual void disconnect();
+		virtual bool is_activated();
+		virtual void tempdump_record();
+		virtual void reread_tempdumped_records();
+
+	private:
+		static bool activated;
+		static char sql_query[1024];
+		static std::string tmp_sql_query; // Object must exist to bind the statement, this used for generating the sql
+		static char sql_query_chanvars[100];
+		static std::string db_filename;
+		static switch_core_db *db;
+		static switch_core_db_stmt_t *stmt;
+		static switch_core_db_stmt_t *stmt_chanvars;
+		static bool connectionstate;
+		static bool logchanvars;
+		static std::list<std::string> chanvars_fixed_list;
+		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;
+};
+
+#endif

Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_multicast.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_event_multicast.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_event_multicast.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_multicast.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_socket/mod_event_socket.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_socket/mod_event_socket.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_socket/mod_event_socket.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_socket.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_event_socket.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_event_socket.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_socket.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_test/mod_event_test.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_test/mod_event_test.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_test/mod_event_test.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_test.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_event_test.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_event_test.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_test.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c	(original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c	Sun Aug 27 11:43:21 2006
@@ -148,7 +148,18 @@
 
 static int on_result(struct session *sess, ikspak * pak)
 {
+	iks *msg, *ctag;
 
+	msg = iks_make_pres (IKS_SHOW_AVAILABLE, "Available"); 
+	ctag = iks_insert(msg, "c");
+	iks_insert_attrib(ctag, "node", "http://www.freeswitch.org/xmpp/client/caps");
+	iks_insert_attrib(ctag, "ver", "1.0.0.1");
+	iks_insert_attrib(ctag, "client", "libdingaling");
+	iks_insert_attrib(ctag, "xmlns", "http://jabber.org/protocol/caps");
+
+	iks_send(sess->parser, msg);
+    iks_delete(msg);
+
 	return IKS_FILTER_EAT;
 }
 
@@ -218,6 +229,23 @@
 	return IKS_OK;
 }
 
+
+static int on_subscribe(void *user_data, ikspak *pak)
+{
+	char *from = iks_find_attrib(pak->x, "from");
+	struct session *sess = (struct session *) user_data;
+
+	iks *msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, from, "mod_xmpp_event"); 
+	iks_send(sess->parser, msg);
+	iks_delete(msg);
+		
+	msg = iks_make_s10n (IKS_TYPE_SUBSCRIBE, from, "mod_xmpp_event"); 
+	iks_send(sess->parser, msg);
+	iks_delete(msg);
+
+	return IKS_FILTER_EAT;
+}
+
 static int on_msg(void *user_data, ikspak * pak)
 {
 	char *cmd = iks_find_cdata(pak->x, "body");
@@ -225,6 +253,7 @@
 	switch_stream_handle_t stream = {0};
 	char retbuf[2048] = "";
 	char *p;
+	iks *msg;
 
 	if ((p = strchr(cmd, '\r')) != 0) {
 		*p++ = '\0';
@@ -242,6 +271,13 @@
 	stream.write_function = switch_console_stream_write;
 	switch_api_execute(cmd, arg, NULL, &stream);
 
+	
+	msg = iks_make_msg(IKS_TYPE_NONE, globals.target_jid, retbuf);
+	iks_insert_attrib(msg, "subject", "Reply");
+	iks_send(globals.session.parser, msg);
+	iks_delete(msg);
+	
+
 	return 0;
 }
 
@@ -276,6 +312,12 @@
 	iks_filter_add_rule(my_filter, on_error, sess,
 						IKS_RULE_TYPE, IKS_PAK_IQ,
 						IKS_RULE_SUBTYPE, IKS_TYPE_ERROR, IKS_RULE_ID, "auth", IKS_RULE_DONE);
+
+	iks_filter_add_rule(my_filter, on_subscribe, sess,
+						IKS_RULE_TYPE, IKS_PAK_S10N,
+						IKS_RULE_SUBTYPE, IKS_TYPE_SUBSCRIBE,
+						IKS_RULE_DONE);
+
 }
 
 static void xmpp_connect(char *jabber_id, char *pass)

Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,15 +17,15 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_XMPPEvent Debug"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\iksemel\include&quot;"
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\iksemel-1.2\include&quot;"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -64,12 +64,13 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="FreeSwitchCore.lib iksemel.lib Ws2_32.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_xmpp_event.dll"
-				LinkIncremental="2"
+				AdditionalDependencies="Ws2_32.lib"
+				ShowProgress="0"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;..\..\..\..\w32\vsnet\$(OutDir)&quot;;&quot;..\..\..\..\libs\iksemel\$(OutDir)&quot;"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_xmpp_event.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_xmpp_event.lib"
 				TargetMachine="1"
@@ -101,15 +102,15 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_XMPPEvent Release"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -125,7 +126,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\iksemel\include&quot;"
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\iksemel-1.2\include&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -145,11 +146,13 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="FreeSwitchCore.lib iksemel.lib Ws2_32.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_xmpp_event.dll"
+				AdditionalDependencies="Ws2_32.lib"
+				ShowProgress="0"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;..\..\..\..\w32\vsnet\$(OutDir)&quot;;&quot;..\..\..\..\libs\iksemel\$(OutDir)&quot;"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,15 +17,15 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot;  Mod_zeroconf Debug"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\howl\include&quot;"
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\howl-1.0.0\include&quot;"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -64,12 +64,12 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies=" libhowld.lib libmDNSResponderd.lib Ws2_32.lib  iphlpapi.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_zeroconf.dll"
-				LinkIncremental="2"
+				AdditionalDependencies="Ws2_32.lib  iphlpapi.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\..\..\libs\howl\src\lib\howl\Win32\$(OutDir)&quot;;&quot;$(InputDir)..\..\..\..\libs\howl\src\lib\mDNSResponder\Win32\$(OutDir)&quot;;&quot;..\..\..\..\w32\vsnet\$(OutDir)&quot;"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_zeroconf.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_zeroconf.lib"
 				TargetMachine="1"
@@ -101,15 +101,15 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot;  Mod_zeroconf Release"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -125,7 +125,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\howl\include&quot;"
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\howl-1.0.0\include&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
 				RuntimeLibrary="0"
 				UsePrecompiledHeader="0"
@@ -145,11 +145,12 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies=" libhowl.lib libmDNSResponder.lib Ws2_32.lib iphlpapi.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_zeroconf.dll"
+				AdditionalDependencies="Ws2_32.lib iphlpapi.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\..\..\libs\howl\src\lib\howl\Win32\$(OutDir)&quot;;&quot;$(InputDir)..\..\..\..\libs\howl\src\lib\mDNSResponder\Win32\$(OutDir)&quot;;&quot;..\..\..\..\w32\vsnet\$(OutDir)&quot;"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/languages/mod_perl/fs_perl.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/languages/mod_perl/fs_perl.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/languages/mod_perl/fs_perl.vcproj	Sun Aug 27 11:43:21 2006
@@ -50,7 +50,7 @@
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,8 +63,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\Perl\$(ProjectName).dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/Perl/$(InputName).dll"
+				Version=""
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\..\..\w32\vsnet\$(ConfigurationName)&quot;"
 				GenerateDebugInformation="true"
 				SubSystem="2"
@@ -142,7 +143,8 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\Perl\$(ProjectName).dll"
+				OutputFile="$(SolutionDir)$(OutDir)/Perl/$(InputName).dll"
+				Version=""
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\..\..\w32\vsnet\$(ConfigurationName)&quot;"
 				GenerateDebugInformation="true"

Modified: freeswitch/branches/mishehu/src/mod/languages/mod_perl/mod_perl.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/languages/mod_perl/mod_perl.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/languages/mod_perl/mod_perl.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -52,7 +52,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -65,11 +65,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_perl.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_perl.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_perl.lib"
 				TargetMachine="1"
@@ -101,8 +101,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -146,10 +146,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_perl.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	(original)
+++ freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	Sun Aug 27 11:43:21 2006
@@ -149,6 +149,262 @@
 };
 
 
+/* Event Object */
+/*********************************************************************************/
+static JSBool event_construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	if (argc > 0) {
+		switch_event_t *event;
+		switch_event_types_t etype;
+		char *ename = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
+
+		if (switch_name_event(ename, &etype) != SWITCH_STATUS_SUCCESS) {
+			*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+			return JS_TRUE;
+		}
+
+		if (etype == SWITCH_EVENT_CUSTOM) {
+			char *subclass_name;
+			if (argc < 1) {
+				*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+				return JS_TRUE;
+			}
+			
+			subclass_name = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
+			if (switch_event_create_subclass(&event, etype, subclass_name) != SWITCH_STATUS_SUCCESS) {
+				*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+				return JS_TRUE;
+			}
+
+		} else {
+			if (!switch_event_create(&event, etype) != SWITCH_STATUS_SUCCESS) {
+				*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+				return JS_TRUE;
+			}
+		}
+
+		JS_SetPrivate(cx, obj, event);
+		return JS_TRUE;
+	}
+
+	return JS_FALSE;
+}
+
+static void event_destroy(JSContext *cx, JSObject *obj)
+{
+	switch_event_t *event = JS_GetPrivate(cx, obj);
+
+	if (event) {
+		switch_event_destroy(&event);
+	}
+}
+
+static JSBool event_add_header(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	switch_event_t *event = JS_GetPrivate(cx, obj);
+
+	if (!event) {
+		*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+		return JS_TRUE;
+	}
+
+	if (argc > 1) {
+		char *hname = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
+		char *hval = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
+		switch_event_add_header(event, SWITCH_STACK_BOTTOM, hname, hval);
+		*rval = BOOLEAN_TO_JSVAL( JS_TRUE );
+		return JS_TRUE;
+	}
+
+	*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+	return JS_TRUE;
+}
+
+static JSBool event_get_header(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	switch_event_t *event = JS_GetPrivate(cx, obj);
+
+	if (!event) {
+		*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+		return JS_TRUE;
+	}
+
+	if (argc > 0) {
+		char *hname = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
+		char *val = switch_event_get_header(event, hname);
+		*rval = STRING_TO_JSVAL (JS_NewStringCopyZ(cx, val));
+		return JS_TRUE;
+	}
+
+	*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+	return JS_TRUE;
+}
+
+static JSBool event_add_body(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	switch_event_t *event = JS_GetPrivate(cx, obj);
+
+	if (!event) {
+		*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+		return JS_TRUE;
+	}
+
+	if (argc > 0) {
+		char *body = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
+		switch_event_add_body(event, body);
+		*rval = BOOLEAN_TO_JSVAL( JS_TRUE );
+		return JS_TRUE;
+	}
+
+	*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+	return JS_TRUE;
+}
+
+static JSBool event_get_body(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	switch_event_t *event = JS_GetPrivate(cx, obj);
+
+	if (!event) {
+		*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+		return JS_TRUE;
+	}
+
+	*rval = STRING_TO_JSVAL (JS_NewStringCopyZ(cx, switch_event_get_body(event)));
+
+	return JS_TRUE;
+}
+
+static JSBool event_serialize(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	switch_event_t *event = JS_GetPrivate(cx, obj);
+	char buf[1024];
+	uint8_t isxml = 0;
+
+	if (!event) {
+		*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+		return JS_TRUE;
+	}
+
+	if (argc > 0) {
+		char *arg = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
+		if (!strcasecmp(arg, "xml")) {
+			isxml++;
+		}
+	}
+
+	if (isxml) {
+		switch_xml_t xml;
+		char *xmlstr;
+		if ((xml = switch_event_xmlize(event, NULL))) {
+            xmlstr = switch_xml_toxml(xml);
+			*rval = STRING_TO_JSVAL (JS_NewStringCopyZ(cx, xmlstr));
+			switch_xml_free(xml);
+            free(xmlstr);
+		} else {
+			*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+		}
+	} else {
+		switch_event_serialize(event, buf, sizeof(buf), NULL);
+		*rval = STRING_TO_JSVAL (JS_NewStringCopyZ(cx, buf));
+	}
+
+	return JS_TRUE;
+}
+
+static JSBool event_fire(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	switch_event_t *event = JS_GetPrivate(cx, obj);
+
+	if (event) {
+		switch_event_fire(&event);
+		JS_SetPrivate(cx, obj, NULL);
+		*rval = BOOLEAN_TO_JSVAL( JS_TRUE );
+		return JS_TRUE;
+	}
+
+	*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+	return JS_TRUE;
+}
+
+static JSBool event_destroy_(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	switch_event_t *event = JS_GetPrivate(cx, obj);
+
+	if (event) {
+		switch_event_destroy(&event);
+		JS_SetPrivate(cx, obj, NULL);
+		*rval = BOOLEAN_TO_JSVAL( JS_TRUE );
+		return JS_TRUE;
+	}
+
+	*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+	return JS_TRUE;
+}
+
+
+
+enum event_tinyid {
+	EVENT_READY
+};
+
+static JSFunctionSpec event_methods[] = {
+	{"addHeader", event_add_header, 1},
+	{"getHeader", event_get_header, 1},
+	{"addBody", event_add_body, 1},
+	{"getBody", event_get_body, 1},
+	{"serialize", event_serialize, 0},
+	{"fire", event_fire, 0},
+	{"destroy", event_destroy_, 0},
+	{0}
+};
+
+
+static JSPropertySpec event_props[] = {
+	{"ready", EVENT_READY, JSPROP_READONLY|JSPROP_PERMANENT}, 
+	{0}
+};
+
+
+static JSBool event_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
+{
+	JSBool res = JS_TRUE;
+	switch_event_t *event = JS_GetPrivate(cx, obj);
+	char *name;
+	int param = 0;
+
+    if (!event) {
+        *vp = BOOLEAN_TO_JSVAL( JS_FALSE );
+		return JS_TRUE;
+    }
+
+	
+	name = JS_GetStringBytes(JS_ValueToString(cx, id));
+    /* numbers are our props anything else is a method */
+    if (name[0] >= 48 && name[0] <= 57) {
+        param = atoi(name);
+    } else {
+        return JS_TRUE;
+    }
+	
+	switch(param) {
+	case EVENT_READY:
+		*vp = BOOLEAN_TO_JSVAL( JS_TRUE );
+		break;
+	}
+
+	return res;
+}
+
+JSClass event_class = {
+	"Event", JSCLASS_HAS_PRIVATE, 
+	JS_PropertyStub,  JS_PropertyStub,	event_getProperty,  JS_PropertyStub, 
+	JS_EnumerateStub, JS_ResolveStub,	JS_ConvertStub,	  event_destroy, NULL, NULL, NULL,
+	event_construct
+};
+
+
+
+
 static void js_error(JSContext *cx, const char *message, JSErrorReport *report)
 {
 	if (message) {
@@ -200,7 +456,7 @@
 			for(d = dtmf; *d; d++) {
 				cb_state->ret_buffer[cb_state->ret_buffer_len++] = *d;
 				if ((cb_state->ret_buffer_len > cb_state->digit_count)||
-					(cb_state->ret_buffer_len > sizeof(cb_state->ret_buffer))||
+					(cb_state->ret_buffer_len > (int32_t) sizeof(cb_state->ret_buffer))||
 					(cb_state->ret_buffer_len >= cb_state->digit_count)
 					) {
 					return SWITCH_STATUS_FALSE;
@@ -317,7 +573,7 @@
 			for(d = dtmf; *d; d++) {
 				cb_state->ret_buffer[cb_state->ret_buffer_len++] = *d;
 				if ((cb_state->ret_buffer_len > cb_state->digit_count)||
-					(cb_state->ret_buffer_len > sizeof(cb_state->ret_buffer))||
+					(cb_state->ret_buffer_len > (int32_t) sizeof(cb_state->ret_buffer))||
 					(cb_state->ret_buffer_len >= cb_state->digit_count)
 					) {
 					return SWITCH_STATUS_FALSE;
@@ -386,7 +642,7 @@
 			for(d = dtmf; *d; d++) {
 				cb_state->ret_buffer[cb_state->ret_buffer_len++] = *d;
 				if ((cb_state->ret_buffer_len > cb_state->digit_count)||
-					(cb_state->ret_buffer_len > sizeof(cb_state->ret_buffer))||
+					(cb_state->ret_buffer_len > (int32_t) sizeof(cb_state->ret_buffer))||
 					(cb_state->ret_buffer_len >= cb_state->digit_count)
 					) {
 					return SWITCH_STATUS_FALSE;
@@ -418,6 +674,38 @@
 	
 }
 
+static JSBool session_flush_digits(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	struct js_session *jss = JS_GetPrivate(cx, obj);
+	switch_channel_t *channel;
+	char buf[256];
+	switch_size_t has;
+
+	channel = switch_core_session_get_channel(jss->session);
+    assert(channel != NULL);
+
+	if ((has = switch_channel_has_dtmf(channel))) {
+		switch_channel_dequeue_dtmf(channel, buf, has);
+	}
+
+	*rval = BOOLEAN_TO_JSVAL( JS_TRUE );
+    return JS_TRUE;
+}
+
+static JSBool session_flush_events(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	struct js_session *jss = JS_GetPrivate(cx, obj);
+	switch_event_t *event;
+
+	while (switch_core_session_dequeue_event(jss->session, &event) == SWITCH_STATUS_SUCCESS) {
+		switch_event_destroy(&event);
+	}
+	
+	*rval = BOOLEAN_TO_JSVAL( JS_TRUE );
+    return JS_TRUE;
+	
+}
+
 static JSBool session_recordfile(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 {
 	struct js_session *jss = JS_GetPrivate(cx, obj);
@@ -515,6 +803,55 @@
 	return (switch_channel_ready(channel)) ? JS_TRUE : JS_FALSE;
 }
 
+static JSBool session_set_variable(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	struct js_session *jss = JS_GetPrivate(cx, obj);
+    switch_channel_t *channel;
+
+	channel = switch_core_session_get_channel(jss->session);
+    assert(channel != NULL);
+
+	if (argc > 1) {
+		char *var, *val;
+
+		var = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
+		val = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
+		switch_channel_set_variable(channel, var, val);
+		*rval = BOOLEAN_TO_JSVAL( JS_TRUE );
+	} else {
+		*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+	}
+ 	
+	return JS_TRUE;
+}
+
+static JSBool session_get_variable(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	struct js_session *jss = JS_GetPrivate(cx, obj);
+    switch_channel_t *channel;
+
+	channel = switch_core_session_get_channel(jss->session);
+    assert(channel != NULL);
+
+	if (argc > 0) {
+		char *var, *val;
+		
+		var = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
+		val = switch_channel_get_variable(channel, var);
+
+		if (val) {
+			*rval = STRING_TO_JSVAL (JS_NewStringCopyZ(cx, val));
+		} else {
+			*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+		}
+	} else {
+		*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+	}
+ 	
+	return JS_TRUE;
+}
+
+
 static JSBool session_speak(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 {
 	struct js_session *jss = JS_GetPrivate(cx, obj);
@@ -681,7 +1018,53 @@
 	return JS_TRUE;
 }
 
+static JSBool session_get_event(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	struct js_session *jss = JS_GetPrivate(cx, obj);
+	switch_event_t *event;
 
+	if (switch_core_session_dequeue_event(jss->session, &event) == SWITCH_STATUS_SUCCESS) {
+		JSObject *Event;
+		if ((Event = JS_DefineObject(cx, obj, "Event", &event_class, NULL, 0))) {
+			if ((JS_SetPrivate(cx, Event, event) &&
+				 JS_DefineProperties(cx, Event, event_props) &&
+				 JS_DefineFunctions(cx, Event, event_methods))) {
+				*rval = OBJECT_TO_JSVAL ( Event );
+				return JS_TRUE;
+			}
+		}
+	}
+	
+	*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+    return JS_TRUE;
+	
+}
+
+static JSBool session_send_event(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	struct js_session *jss = JS_GetPrivate(cx, obj);
+	switch_event_t *event;
+	JSObject *Event;
+
+	if (argc > 0) {
+		if (JS_ValueToObject(cx, argv[0], &Event)) {
+			if ((event = JS_GetPrivate(cx, Event))) {
+				if (switch_core_session_receive_event(jss->session, &event) != SWITCH_STATUS_SUCCESS) {
+					*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+					return JS_TRUE;
+				}
+
+				JS_SetPrivate(cx, Event, NULL);
+			}
+		}
+	}
+
+	*rval = BOOLEAN_TO_JSVAL( JS_TRUE );
+    return JS_TRUE;
+	
+}
+
+
 static JSBool session_hangup(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 {
 	struct js_session *jss = JS_GetPrivate(cx, obj);
@@ -845,6 +1228,7 @@
 }
 #endif
 
+
 /* Session Object */
 /*********************************************************************************/
 enum session_tinyid {
@@ -855,11 +1239,17 @@
 static JSFunctionSpec session_methods[] = {
 	{"streamFile", session_streamfile, 1}, 
 	{"recordFile", session_recordfile, 1}, 
+	{"flushEvents", session_flush_events, 1}, 
+	{"flushDigits", session_flush_digits, 1}, 
 	{"speak", session_speak, 1}, 
+	{"setVariable", session_set_variable, 1}, 
+	{"getVariable", session_get_variable, 1}, 
 	{"getDigits", session_get_digits, 1},
 	{"answer", session_answer, 0}, 
 	{"ready", session_ready, 0}, 
 	{"waitForAnswer", session_wait_for_answer, 0}, 
+	{"getEvent", session_get_event, 0},
+	{"sendEvent", session_send_event, 0},
 	{"hangup", session_hangup, 0}, 
 	{"execute", session_execute, 0}, 
 	{0}
@@ -998,12 +1388,11 @@
 static JSBool session_construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 {
 	switch_memory_pool_t *pool = NULL;
-	if (argc > 2) {
+	if (argc > 1) {
 		struct js_session *jss = NULL;
 		JSObject *session_obj;
 		switch_core_session_t *session = NULL, *peer_session = NULL;
 		switch_caller_profile_t *caller_profile = NULL;
-		char *channel_type = NULL;
 		char *dest = NULL;
 		char *dialplan = NULL;
 		char *cid_name = "";
@@ -1014,6 +1403,7 @@
 		char *rdnis = "";
 		char *context = "";
 		char *username = NULL;
+		char *to = NULL;
 		*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
 
 		if (JS_ValueToObject(cx, argv[0], &session_obj)) {
@@ -1023,35 +1413,37 @@
 			}
 		}
 
-		channel_type = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
-		dest = JS_GetStringBytes(JS_ValueToString(cx, argv[2]));
+		dest = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
 
+		if (argc > 2) {
+			dialplan = JS_GetStringBytes(JS_ValueToString(cx, argv[2]));
+		}
 		if (argc > 3) {
-			dialplan = JS_GetStringBytes(JS_ValueToString(cx, argv[3]));
+			context = JS_GetStringBytes(JS_ValueToString(cx, argv[3]));
 		}
 		if (argc > 4) {
-			context = JS_GetStringBytes(JS_ValueToString(cx, argv[4]));
+			cid_name = JS_GetStringBytes(JS_ValueToString(cx, argv[4]));
 		}
 		if (argc > 5) {
-			cid_name = JS_GetStringBytes(JS_ValueToString(cx, argv[5]));
+			cid_num = JS_GetStringBytes(JS_ValueToString(cx, argv[5]));
 		}
 		if (argc > 6) {
-			cid_num = JS_GetStringBytes(JS_ValueToString(cx, argv[6]));
+			network_addr = JS_GetStringBytes(JS_ValueToString(cx, argv[6]));
 		}
 		if (argc > 7) {
-			network_addr = JS_GetStringBytes(JS_ValueToString(cx, argv[7]));
+			ani = JS_GetStringBytes(JS_ValueToString(cx, argv[7]));
 		}
 		if (argc > 8) {
-			ani = JS_GetStringBytes(JS_ValueToString(cx, argv[8]));
+			ani2 = JS_GetStringBytes(JS_ValueToString(cx, argv[8]));
 		}
 		if (argc > 9) {
-			ani2 = JS_GetStringBytes(JS_ValueToString(cx, argv[9]));
+			rdnis = JS_GetStringBytes(JS_ValueToString(cx, argv[9]));
 		}
 		if (argc > 10) {
-			rdnis = JS_GetStringBytes(JS_ValueToString(cx, argv[10]));
+			username = JS_GetStringBytes(JS_ValueToString(cx, argv[10]));
 		}
 		if (argc > 11) {
-			username = JS_GetStringBytes(JS_ValueToString(cx, argv[11]));
+			to = JS_GetStringBytes(JS_ValueToString(cx, argv[11]));
 		}
 		
 		
@@ -1060,20 +1452,32 @@
 			return JS_FALSE;
 		}
 
-		caller_profile = switch_caller_profile_new(pool, username, dialplan, cid_name, cid_num, network_addr, ani, ani2, rdnis, (char *)modname, context, dest);
-		if (switch_core_session_outgoing_channel(session, channel_type, caller_profile, &peer_session, pool) == SWITCH_STATUS_SUCCESS) {
-			jss = switch_core_session_alloc(peer_session, sizeof(*jss));
-			jss->session = peer_session;
-			jss->flags = 0;
-			jss->cx = cx;
-			jss->obj = obj;
-			JS_SetPrivate(cx, obj, jss);
-			switch_core_session_thread_launch(peer_session);
-			switch_set_flag(jss, S_HUP);
+		caller_profile = switch_caller_profile_new(pool,
+												   username,
+												   dialplan,
+												   cid_name,
+												   cid_num,
+												   network_addr,
+												   ani,
+												   ani2,
+												   rdnis,
+												   (char *)modname,
+												   context,
+												   dest);
+		
+		if (switch_ivr_originate(session, &peer_session, dest, to ? atoi(to) : 60, NULL, NULL, NULL, caller_profile) != SWITCH_STATUS_SUCCESS) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot Create Outgoing Channel! [%s]\n", dest);
 			return JS_TRUE;
-		} else {
-			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Channel\n");			
 		}
+
+		jss = switch_core_session_alloc(peer_session, sizeof(*jss));
+		jss->session = peer_session;
+		jss->flags = 0;
+		jss->cx = cx;
+		jss->obj = obj;
+		JS_SetPrivate(cx, obj, jss);
+		switch_set_flag(jss, S_HUP);
+
 	} else {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Missing Args\n");
 	}
@@ -1135,9 +1539,10 @@
 		}
 		switch_core_new_memory_pool(&pool);
 		if (switch_file_open(&fd, path, flags, SWITCH_FPROT_UREAD|SWITCH_FPROT_UWRITE, pool) != SWITCH_STATUS_SUCCESS) {
-			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Open File!\n");
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Open File: %s\n", path);
 			switch_core_destroy_memory_pool(&pool);
-			return JS_FALSE;
+			*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+			return JS_TRUE;
 		}
 		fio = switch_core_alloc(pool, sizeof(*fio));
 		fio->fd = fd;
@@ -1148,14 +1553,18 @@
 		return JS_TRUE;
 	}
 
-	return JS_FALSE;
+	return JS_TRUE;
 }
 static void fileio_destroy(JSContext *cx, JSObject *obj)
 {
 	struct fileio_obj *fio = JS_GetPrivate(cx, obj);
 
 	if (fio) {
-		switch_memory_pool_t *pool = fio->pool;
+		switch_memory_pool_t *pool;
+			if (fio->fd) {
+			switch_file_close(fio->fd);
+		}
+		pool = fio->pool;
 		switch_core_destroy_memory_pool(&pool);
 		pool = NULL;
 	}
@@ -1169,6 +1578,10 @@
 
 	*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
 
+	if (fio) {
+		return JS_TRUE;
+	}
+
 	if (!(fio->flags & SWITCH_FOPEN_READ)) {
 		return JS_TRUE;
 	}
@@ -1194,6 +1607,12 @@
 static JSBool fileio_data(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 {
 	struct fileio_obj *fio = JS_GetPrivate(cx, obj);
+
+	if (!fio) {
+		*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+		return JS_TRUE;
+	}
+
 	*rval = STRING_TO_JSVAL (JS_NewStringCopyZ(cx, fio->buf));
 	return JS_TRUE;
 }
@@ -1204,6 +1623,11 @@
 	switch_size_t wrote = 0;
 	char *data = NULL;
 
+	if (!fio) {
+		*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
+		return JS_TRUE;
+	}
+
 	if (!(fio->flags & SWITCH_FOPEN_WRITE)) {
 		*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
 		return JS_TRUE;
@@ -1214,7 +1638,7 @@
 	}
 
 	if (data) {
-		wrote = 0;
+		wrote = strlen(data);
 		*rval = BOOLEAN_TO_JSVAL( (switch_file_write(fio->fd, data, &wrote) == SWITCH_STATUS_SUCCESS) ? JS_TRUE : JS_FALSE);
 	}
 
@@ -1223,7 +1647,7 @@
 }
 
 enum fileio_tinyid {
-	FILEIO_PATH
+	FILEIO_PATH, FILEIO_OPEN
 };
 
 static JSFunctionSpec fileio_methods[] = {
@@ -1236,6 +1660,7 @@
 
 static JSPropertySpec fileio_props[] = {
 	{"path", FILEIO_PATH, JSPROP_READONLY|JSPROP_PERMANENT}, 
+	{"open", FILEIO_OPEN, JSPROP_READONLY|JSPROP_PERMANENT}, 
 	{0}
 };
 
@@ -1257,8 +1682,15 @@
 	
 	switch(param) {
 	case FILEIO_PATH:
-		*vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, fio->path));
+		if (fio) {
+			*vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, fio->path));
+		} else {
+			*vp = BOOLEAN_TO_JSVAL( JS_FALSE );
+		}
 		break;
+	case FILEIO_OPEN:
+		*vp = BOOLEAN_TO_JSVAL( fio ? JS_TRUE : JS_FALSE );
+		break;
 	}
 
 	return res;
@@ -1787,6 +2219,11 @@
 
 /* Built-In*/
 /*********************************************************************************/
+static JSBool js_exit(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+	return JS_FALSE;
+}
+
 static JSBool js_log(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 {
 	char *level_str, *msg;
@@ -1875,7 +2312,6 @@
 {
 	struct js_session *jss_a = NULL, *jss_b = NULL;
 	JSObject *session_obj_a = NULL, *session_obj_b = NULL;
-	int32 timelimit = 60;
 
 	if (argc > 1) {
 		if (JS_ValueToObject(cx, argv[0], &session_obj_a)) {
@@ -1892,18 +2328,12 @@
 		} 
 	}
 	
-	if (argc > 3) {
-		if (!JS_ValueToInt32(cx, argv[3], &timelimit)) {
-			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Convert to INT\n");
-			return JS_FALSE;
-		}
-	}
 	if (!(jss_a && jss_b)) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failure! %s %s\n", jss_a ? "y" : "n", jss_b ? "y" : "n");
 		return JS_FALSE;
 	}
 
-	switch_ivr_multi_threaded_bridge(jss_a->session, jss_b->session, timelimit, NULL, NULL, NULL);
+	switch_ivr_multi_threaded_bridge(jss_a->session, jss_b->session, NULL, NULL, NULL);
 	return JS_TRUE;
 }
 
@@ -2030,6 +2460,7 @@
 
 static JSFunctionSpec fs_functions[] = {
 	{"console_log", js_log, 2}, 
+	{"exit", js_exit, 0}, 
 	{"include", js_include, 1}, 
 	{"email", js_email, 2}, 
 	{"bridge", js_bridge, 2},
@@ -2124,6 +2555,18 @@
 				 db_methods,
 				 db_props,
 				 db_methods
+				 );
+
+	JS_InitClass(cx,
+				 javascript_object,
+				 NULL,
+				 &event_class,
+				 event_construct,
+				 3,
+				 event_props,
+				 event_methods,
+				 event_props,
+				 event_methods
 				 );
 
 	return 1;

Modified: freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/mod_spidermonkey.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/mod_spidermonkey.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/mod_spidermonkey.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,15 +17,15 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_SpiderMonkey Debug"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\js\src&quot;;&quot;$(InputDir)..\..\..\..\libs\curl\include&quot;;&quot;$(InputDir)..\..\..\..\libs\libteletone\src&quot;"
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\js20051231\src&quot;;&quot;$(InputDir)..\..\..\..\libs\curl-7.15.2\include&quot;;&quot;$(InputDir)..\..\..\..\libs\libteletone\src&quot;"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;XP_WIN;DEBUG;_X86_=1;JSFILE;EXPORT_JS_API;HAVE_CURL;CURL_STATICLIB"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -64,13 +64,13 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				LinkLibraryDependencies="false"
-				AdditionalDependencies="js32.lib curllib.lib ws2_32.lib winmm.lib sqlite.lib fdlibm.lib libnspr4.lib libplc4.lib libplds4.lib libteletone.lib FreeSwitchCore.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_spidermonkey.dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="&quot;..\..\..\..\libs\js\src\$(OutDir)&quot;;&quot;..\..\..\..\libs\curl\lib\$(OutDir)&quot;;&quot;..\..\..\..\libs\sqlite\$(OutDir)&quot;;..\..\..\..\libs\js\nspr\lib;&quot;..\..\..\..\w32\vsnet\$(OutDir)&quot;;&quot;..\..\..\..\libs\libetpan\build-windows\libetpan\$(OutDir)&quot;"
+				LinkLibraryDependencies="true"
+				AdditionalDependencies="ws2_32.lib winmm.lib libnspr4.lib libplc4.lib libplds4.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="&quot;..\..\..\..\libs\nspr-4.6.1.winnt5.$(OutDir)\nspr-4.6.1\lib&quot;"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_spidermonkey.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_spidermonkey.lib"
 				TargetMachine="1"
@@ -102,15 +102,15 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_SpiderMonkey Release"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -126,7 +126,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\js\src&quot;;&quot;$(InputDir)..\..\..\..\libs\curl\include&quot;;&quot;$(InputDir)..\..\..\..\libs\libteletone\src&quot;"
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\js20051231\src&quot;;&quot;$(InputDir)..\..\..\..\libs\curl-7.15.2\include&quot;;&quot;$(InputDir)..\..\..\..\libs\libteletone\src&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;XP_WIN;_X86_=1;JSFILE;EXPORT_JS_API;HAVE_CURL;CURL_STATICLIB"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -146,12 +146,13 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				LinkLibraryDependencies="false"
-				AdditionalDependencies="js32.lib curllib.lib ws2_32.lib winmm.lib sqlite.lib fdlibm.lib libnspr4.lib libplc4.lib libplds4.lib libteletone.lib FreeSwitchCore.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_spidermonkey.dll"
+				LinkLibraryDependencies="true"
+				AdditionalDependencies="ws2_32.lib winmm.lib libnspr4.lib libplc4.lib libplds4.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="&quot;..\..\..\..\libs\js\src\$(OutDir)&quot;;&quot;..\..\..\..\libs\curl\lib\$(OutDir)&quot;;&quot;..\..\..\..\libs\sqlite\$(OutDir)&quot;;..\..\..\..\libs\js\nspr\lib;&quot;..\..\..\..\w32\vsnet\$(OutDir)&quot;;&quot;..\..\..\..\libs\libetpan\build-windows\libetpan\$(OutDir)&quot;"
+				AdditionalLibraryDirectories="&quot;..\..\..\..\libs\nspr-4.6.1.winnt5.$(OutDir)\nspr-4.6.1\lib&quot;"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_console/mod_console.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_console/mod_console.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_console/mod_console.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_console.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_console.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_console.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_console.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_syslog/mod_syslog.c
==============================================================================
--- freeswitch/branches/mishehu/src/mod/loggers/mod_syslog/mod_syslog.c	(original)
+++ freeswitch/branches/mishehu/src/mod/loggers/mod_syslog/mod_syslog.c	Sun Aug 27 11:43:21 2006
@@ -105,8 +105,8 @@
 
 SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
 {
-	*interface = &console_module_interface;
 	switch_status_t status;
+	*interface = &console_module_interface;
 
 	if ((status=load_config()) != SWITCH_STATUS_SUCCESS) {
 		return status;

Modified: freeswitch/branches/mishehu/src/mod/timers/mod_softtimer/mod_softtimer.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/timers/mod_softtimer/mod_softtimer.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/timers/mod_softtimer/mod_softtimer.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,8 +17,8 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -50,7 +50,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,11 +63,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_softtimer.dll"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_softtimer.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_softtimer.lib"
 				TargetMachine="1"
@@ -99,8 +99,8 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
@@ -142,10 +142,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_softtimer.dll"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.vcproj
==============================================================================
--- freeswitch/branches/mishehu/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.vcproj	(original)
+++ freeswitch/branches/mishehu/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,15 +17,15 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_XMLRpc Debug"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\xmlrpc\include&quot;;&quot;$(InputDir)..\..\..\..\libs\xmlrpc&quot;"
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\xmlrpc-c-1.03.14\include&quot;;&quot;$(InputDir)..\..\..\..\libs\xmlrpc-c-1.03.14&quot;;&quot;$(InputDir)..\..\..\..\libs\curl-7.15.2\include&quot;"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;ABYSS_WIN32;CURL_STATICLIB"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -51,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -64,12 +64,12 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="curllib.lib  Winmm.lib Ws2_32.lib xmlrpcD.lib Abyss.lib xml.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_xml_rpc.dll"
-				LinkIncremental="2"
+				AdditionalDependencies="Winmm.lib Ws2_32.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;..\..\..\..\w32\vsnet\$(OutDir)&quot;;..\..\..\..\libs\xmlrpc\lib;&quot;..\..\..\..\libs\xmlrpc\lib\abyss\src\$(OutDir)&quot;;&quot;..\..\..\..\libs\apr-util\xml\expat\lib\LibD&quot;"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_xml_rpc.pdb"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				ImportLibrary="$(OutDir)/mod_xml_rpc.lib"
 				TargetMachine="1"
@@ -101,15 +101,15 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="cscript /nologo &quot;$(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs&quot; Mod_XMLRpc Release"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -125,7 +125,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\xmlrpc\include&quot;;&quot;$(InputDir)..\..\..\..\libs\xmlrpc&quot;"
+				AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\xmlrpc-c-1.03.14\include&quot;;&quot;$(InputDir)..\..\..\..\libs\xmlrpc-c-1.03.14&quot;;&quot;$(InputDir)..\..\..\..\libs\curl-7.15.2\include&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;ABYSS_WIN32;CURL_STATICLIB"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -145,11 +145,12 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="curllib.lib  Winmm.lib Ws2_32.lib xmlrpc.lib Abyss.lib xml.lib"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_xml_rpc.dll"
+				AdditionalDependencies="Winmm.lib Ws2_32.lib"
+				OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;..\..\..\..\w32\vsnet\$(OutDir)&quot;;..\..\..\..\libs\xmlrpc\lib;&quot;..\..\..\..\libs\xmlrpc\lib\abyss\src\$(OutDir)&quot;;&quot;..\..\..\..\libs\apr-util\xml\expat\lib\LibR&quot;"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/src/switch.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch.c	(original)
+++ freeswitch/branches/mishehu/src/switch.c	Sun Aug 27 11:43:21 2006
@@ -31,85 +31,213 @@
  */
 
 #include <switch.h>
-#include <switch_version.h>
-#ifdef HAVE_MLOCKALL
-#include <sys/mman.h>
-#endif
 
+#define PIDFILE "freeswitch.pid"
+#define LOGFILE "freeswitch.log"
 static int RUNNING = 0;
+static char *lfile = LOGFILE;
+static char *pfile = PIDFILE;
+#define SERVICENAME "Freeswitch"
 
-static int handle_SIGPIPE(int sig)
+#ifdef __ICC
+#pragma warning (disable:167)
+#endif
+
+
+#ifdef WIN32
+#include <winsock2.h>
+#include <windows.h>
+static HANDLE shutdown_event;
+#endif
+
+	static int handle_SIGHUP(int sig)
 {
 	if(sig);
-	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Sig Pipe!\n");
+	RUNNING = 0;
 	return 0;
 }
-#ifdef TRAP_BUS
-static int handle_SIGBUS(int sig)
+
+static void set_high_priority()
 {
-	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Sig BUS!\n");
-	return 0;
+#ifdef WIN32
+	SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
+#else
+	nice(-20);
+#endif
 }
+
+static void freeswitch_runtime_loop(int bg)
+{
+	if (bg) {
+		bg = 0;
+#ifdef WIN32
+		WaitForSingleObject(shutdown_event, INFINITE);
+#else
+		RUNNING = 1;
+		while(RUNNING) {
+			switch_yield(10000);
+		}
 #endif
+	}  else {
+		/* wait for console input */
+		switch_console_loop();
+	}
+}
 
-/* no ctl-c mofo */
-static int handle_SIGINT(int sig)
+static int freeswitch_kill_background()
 {
-	if (sig);
+	FILE *f;
+	char path[256] = "";
+	pid_t pid = 0;
+	switch_core_set_globals();
+	snprintf(path, sizeof(path), "%s%s%s", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR, pfile);
+	if ((f = fopen(path, "r")) == 0) {
+		fprintf(stderr, "Cannot open pid file %s.\n", path);
+		return 255;
+	}
+	fscanf(f, "%d", &pid);
+	if (pid > 0) {
+		fprintf(stderr, "Killing: %d\n", (int) pid);
+#ifdef WIN32
+		snprintf(path, sizeof(path), "Global\\Freeswitch.%d", pid);
+		shutdown_event = OpenEvent(EVENT_MODIFY_STATE, FALSE, path);
+		if (!shutdown_event) {
+			/* we can't get the event, so we can't signal the process to shutdown */
+			fprintf(stderr, "ERROR: Can't Shutdown: %d\n", (int) pid);
+		} else {
+			SetEvent(shutdown_event);
+		}
+		CloseHandle(shutdown_event);
+#else
+		kill(pid, SIGTERM);
+#endif
+	}
+
+	fclose(f);
 	return 0;
 }
 
+#ifdef WIN32
+SERVICE_STATUS_HANDLE hStatus;
+SERVICE_STATUS status;
 
-static int handle_SIGHUP(int sig)
+void WINAPI ServiceCtrlHandler( DWORD control )
 {
-	if(sig);
-	RUNNING = 0;
-	return 0;
+    switch( control )
+    {
+    case SERVICE_CONTROL_SHUTDOWN:
+    case SERVICE_CONTROL_STOP:
+        // do shutdown stuff here
+		switch_core_destroy();
+        status.dwCurrentState = SERVICE_STOPPED;
+        status.dwWin32ExitCode = 0;
+        status.dwCheckPoint = 0;
+        status.dwWaitHint = 0;
+        break;
+    case SERVICE_CONTROL_INTERROGATE:
+        // just set the current state to whatever it is...
+        break;
+    }
+
+    SetServiceStatus( hStatus, &status );
 }
 
+void WINAPI service_main( DWORD numArgs, char **args )
+{
+	const char *err = NULL;
+    // we have to initialize the service-specific stuff
+    memset( &status, 0, sizeof(SERVICE_STATUS) );
+    status.dwServiceType = SERVICE_WIN32;
+    status.dwCurrentState = SERVICE_START_PENDING;
+    status.dwControlsAccepted = SERVICE_ACCEPT_STOP;
+
+    hStatus = RegisterServiceCtrlHandler( SERVICENAME, &ServiceCtrlHandler );
+
+    SetServiceStatus( hStatus, &status );
+	set_high_priority();
+	if (switch_core_init_and_modload(lfile, &err) != SWITCH_STATUS_SUCCESS) {
+	    status.dwCurrentState = SERVICE_STOPPED;
+	} else {
+		status.dwCurrentState = SERVICE_RUNNING;
+	}
+
+    SetServiceStatus( hStatus, &status );
+}
+
+#endif
+
 int main(int argc, char *argv[])
 {
-	char *lfile = "freeswitch.log";
-	char *pfile = "freeswitch.pid";
 	char path[256] = "";
 	char *ppath = NULL;
 	const char *err = NULL;
-	switch_event_t *event;
 	int bg = 0;
 	FILE *f;
+	pid_t pid = 0;
+
 #ifdef WIN32
-	SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
-#else
-	int pid;
-	nice(-20);
-#endif
+    SERVICE_TABLE_ENTRY dispatchTable[] =
+    {
+        { SERVICENAME, &service_main },
+        { NULL, NULL }
+    };
 
-#ifndef WIN32
-	if (argv[1] && !strcmp(argv[1], "-stop")) {
-		pid_t pid = 0;
-		switch_core_set_globals();
-		snprintf(path, sizeof(path), "%s%s%s", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR, pfile);
-		if ((f = fopen(path, "r")) == 0) {
-			fprintf(stderr, "Cannot open pid file %s.\n", path);
-			return 255;
+	if (argv[1] && !strcmp(argv[1], "-service")) {
+		if(StartServiceCtrlDispatcher( dispatchTable ) == 0 )
+		{
+			//Not loaded as a service
+			fprintf(stderr, "Error Freeswitch loaded as a console app with -service option\n");
+			fprintf(stderr, "To install the service load freeswitch with -install\n");
 		}
-		fscanf(f, "%d", &pid);
-		if (pid > 0) {
-			fprintf(stderr, "Killing %d\n", (int) pid);
-			kill(pid, SIGTERM);
-		}
+		exit(0);
+	}
+	if (argv[1] && !strcmp(argv[1], "-install")) {
+		char exePath[1024];
+	    char servicePath[1024];
 
-		fclose(f);
-		return 0;
+		SC_HANDLE handle = OpenSCManager( NULL, NULL, SC_MANAGER_ALL_ACCESS );
+		GetModuleFileName( NULL, exePath, 1024 );
+		snprintf(servicePath, sizeof(servicePath), "%s -service", exePath);
+		CreateService(
+			handle,
+			SERVICENAME,
+			SERVICENAME,
+			GENERIC_READ | GENERIC_EXECUTE,
+			SERVICE_WIN32_OWN_PROCESS,
+			SERVICE_AUTO_START,
+			SERVICE_ERROR_IGNORE,
+			servicePath,
+			NULL,
+			NULL,
+			NULL,
+			NULL,
+			NULL
+		);
+		exit(0);
 	}
+	if (argv[1] && !strcmp(argv[1], "-uninstall")) {
+		SC_HANDLE handle = OpenSCManager( NULL, NULL, SC_MANAGER_ALL_ACCESS );
+		SC_HANDLE service = OpenService( handle, SERVICENAME, DELETE );
+		if( service != NULL )
+		{
+			// remove the service!
+			DeleteService( service );
+		}
+		exit(0);
+	}
 #endif
 
+	set_high_priority();
+
+	if (argv[1] && !strcmp(argv[1], "-stop")) {
+		return freeswitch_kill_background();
+	}
+
 	if (argv[1] && !strcmp(argv[1], "-nc")) {
 		bg++;
 	}
 
 	if (bg) {
-		//snprintf(path, sizeof(path), "%s%c%s", SWITCH_GLOBAL_dirs.log_dir, sep, lfile);
 		ppath = lfile;
 
 		signal(SIGHUP, (void *) handle_SIGHUP);
@@ -117,113 +245,31 @@
 
 #ifdef WIN32
 		FreeConsole();
+		snprintf(path, sizeof(path), "Global\\Freeswitch.%d", getpid());
+		shutdown_event = CreateEvent(NULL, FALSE, FALSE, path);		
 #else
 		if ((pid = fork())) {
 			fprintf(stderr, "%d Backgrounding.\n", (int)pid);
 			exit(0);
 		}
 #endif
-	
 	}
 
-
-	if (switch_core_init(ppath, &err) != SWITCH_STATUS_SUCCESS) {
+	if (switch_core_init_and_modload(ppath, &err) != SWITCH_STATUS_SUCCESS) {
 		fprintf(stderr, "Cannot Initilize [%s]\n", err);
 		return 255;
 	}
 
-
-#ifdef __ICC
-#pragma warning (disable:167)
-#endif
-
-	/* set signal handlers */
-	signal(SIGINT, (void *) handle_SIGINT);
-#ifdef SIGPIPE
-	signal(SIGPIPE, (void *) handle_SIGPIPE);
-#endif
-#ifdef TRAP_BUS
-	signal(SIGBUS, (void *) handle_SIGBUS);
-#endif
-
-
-
-
-
-
 	snprintf(path, sizeof(path), "%s%s%s", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR, pfile);
 	if ((f = fopen(path, "w")) == 0) {
 		fprintf(stderr, "Cannot open pid file %s.\n", path);
 		return 255;
 	}
 
-	fprintf(f, "%d", getpid());
+	fprintf(f, "%d", pid = getpid());
 	fclose(f);
-	
-	if (!err) {
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Bringing up environment.\n");
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Loading Modules.\n");
-		if (switch_loadable_module_init() != SWITCH_STATUS_SUCCESS) {
-			err = "Cannot load modules";
-		}
-	}
 
-	if (err) {
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Error: %s", err);
-		exit(-1);
-	}
+	freeswitch_runtime_loop(bg);
 
-	if (switch_event_create(&event, SWITCH_EVENT_STARTUP) == SWITCH_STATUS_SUCCESS) {
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Event-Info", "System Ready");
-		switch_event_fire(&event);
-	}
-
-#ifdef HAVE_MLOCKALL
-	mlockall(MCL_CURRENT|MCL_FUTURE);
-#endif
-
-
-#ifdef CRASH_PROT
-#define __CP "ENABLED"
-#else
-#define __CP "DISABLED"
-#endif
-
-	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) {
-		bg = 0;
-		RUNNING = 1;
-		while(RUNNING) {
-#ifdef WIN32
-		bg++;
-		if(bg == 100) {
-			if ((f = fopen(path, "r")) == 0) {
-				break;
-			}
-			fclose(f);
-			bg = 0;
-		}
-#endif
-			switch_yield(10000);
-		}
-	}  else {
-		/* wait for console input */
-		switch_console_loop();
-	}
-	
-	if (switch_event_create(&event, SWITCH_EVENT_SHUTDOWN) == SWITCH_STATUS_SUCCESS) {
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Event-Info", "System Shutting Down");
-		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");
-	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Exiting Now.\n");
-	switch_core_destroy();
-	return 0;
+	return switch_core_destroy();
 }

Modified: freeswitch/branches/mishehu/src/switch_channel.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch_channel.c	(original)
+++ freeswitch/branches/mishehu/src/switch_channel.c	Sun Aug 27 11:43:21 2006
@@ -84,6 +84,7 @@
 	{ "INTERWORKING", SWITCH_CAUSE_INTERWORKING },
 	{ "CRASH", SWITCH_CAUSE_CRASH },
 	{ "SYSTEM_SHUTDOWN", SWITCH_CAUSE_SYSTEM_SHUTDOWN },
+	{ "LOSE_RACE", SWITCH_CAUSE_LOSE_RACE },
 	{ NULL, 0 }
 };
 
@@ -762,9 +763,14 @@
 SWITCH_DECLARE(int) switch_channel_add_state_handler(switch_channel_t *channel,
 													 const switch_state_handler_table_t *state_handler)
 {
-	int index;
+	int x, index;
 
 	assert(channel != NULL);
+	for (x = 0; x < SWITCH_MAX_STATE_HANDLERS; x++) {
+		if (channel->state_handlers[x] == state_handler) {
+			return x;
+		}
+	}
 	index = channel->state_handler_index++;
 
 	if (channel->state_handler_index >= SWITCH_MAX_STATE_HANDLERS) {
@@ -793,17 +799,20 @@
 
 	assert(channel != NULL);
 
-
-	for (index = 0; index < channel->state_handler_index; index++) {
-		if (channel->state_handlers[index] != state_handler) {
-			new_handlers[i++] = channel->state_handlers[index];
+	if (state_handler) {
+		for (index = 0; index < channel->state_handler_index; index++) {
+			if (channel->state_handlers[index] != state_handler) {
+				new_handlers[i++] = channel->state_handlers[index];
+			}
 		}
 	}
 	for (index = 0; index < SWITCH_MAX_STATE_HANDLERS; index++) {
 		channel->state_handlers[index] = NULL;
 	}
-	for (index = 0; index < i; index++) {
-		channel->state_handlers[index] = new_handlers[i];
+	if (state_handler) {
+		for (index = 0; index < i; index++) {
+			channel->state_handlers[index] = new_handlers[i];
+		}
 	}
 
 }

Modified: freeswitch/branches/mishehu/src/switch_console.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch_console.c	(original)
+++ freeswitch/branches/mishehu/src/switch_console.c	Sun Aug 27 11:43:21 2006
@@ -176,9 +176,9 @@
 {
 	char hostname[256];
 	char cmd[2048];
-	int running = 1, x = 0, activity = 1;
+	int running = 1, activity = 1;
 	char *retbuf = (char *)malloc(CMD_BUFLEN);
-
+	switch_size_t x = 0;
 
 	assert(retbuf != NULL);
 	gethostname(hostname, sizeof(hostname));

Modified: freeswitch/branches/mishehu/src/switch_core.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch_core.c	(original)
+++ freeswitch/branches/mishehu/src/switch_core.c	Sun Aug 27 11:43:21 2006
@@ -32,8 +32,20 @@
 
 #include <switch.h>
 #include <stdio.h>
+#include <switch_version.h>
+
+#ifdef HAVE_MLOCKALL
+#include <sys/mman.h>
+#endif
+
 //#define DEBUG_ALLOC
 
+#ifdef CRASH_PROT
+#define __CP "ENABLED"
+#else
+#define __CP "DISABLED"
+#endif
+
 #define SWITCH_EVENT_QUEUE_LEN 256
 #define SWITCH_SQL_QUEUE_LEN 2000
 
@@ -120,7 +132,7 @@
 	if (strchr(dbname, '/')) {
 		strncpy(buf, dbname, size);
 	} else {
-		snprintf(buf, size, "%s%s%s.db", SWITCH_DB_DIR, SWITCH_PATH_SEPARATOR, dbname);
+		snprintf(buf, size, "%s%s%s.db", SWITCH_GLOBAL_dirs.db_dir, SWITCH_PATH_SEPARATOR, dbname);
 	}
 }
 
@@ -233,7 +245,12 @@
 
 SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(switch_core_session_t *session)
 {
-	return (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock);
+	switch_status_t status = SWITCH_STATUS_SUCCESS;
+
+
+	status = (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock);
+	
+	return status;
 }
 
 SWITCH_DECLARE(void) switch_core_session_write_lock(switch_core_session_t *session)
@@ -243,7 +260,9 @@
 
 SWITCH_DECLARE(void) switch_core_session_rwunlock(switch_core_session_t *session)
 {
+
 	switch_thread_rwlock_unlock(session->rwlock);
+
 }
 
 SWITCH_DECLARE(switch_core_session_t *) switch_core_session_locate(char *uuid_str)
@@ -282,8 +301,8 @@
 	}
 	switch_mutex_unlock(runtime.session_table_mutex);
 
-	while(runtime.session_count) {
-		switch_yield(1000);
+	while(runtime.session_count > 0) {
+		switch_yield(10000);
 	}
 }
 
@@ -334,8 +353,17 @@
 
 SWITCH_DECLARE(switch_status_t) switch_core_session_set_read_codec(switch_core_session_t *session, switch_codec_t *codec)
 {
+	switch_event_t *event;
+
 	assert(session != NULL);
 
+	if (switch_event_create(&event, SWITCH_EVENT_CODEC) == SWITCH_STATUS_SUCCESS) {
+		switch_channel_event_set_data(session->channel, event);
+		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-read-codec-name", codec->implementation->iananame);
+		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-read-codec-rate", "%d", codec->implementation->samples_per_second);
+		switch_event_fire(&event);
+	}
+				
 	session->read_codec = codec;
 	return SWITCH_STATUS_SUCCESS;
 }
@@ -347,8 +375,16 @@
 
 SWITCH_DECLARE(switch_status_t) switch_core_session_set_write_codec(switch_core_session_t *session, switch_codec_t *codec)
 {
+	switch_event_t *event;
 	assert(session != NULL);
 
+	if (switch_event_create(&event, SWITCH_EVENT_CODEC) == SWITCH_STATUS_SUCCESS) {
+		switch_channel_event_set_data(session->channel, event);
+		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-write-codec-name", codec->implementation->iananame);
+		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-write-codec-rate", "%d", codec->implementation->samples_per_second);
+		switch_event_fire(&event);
+	}
+
 	session->write_codec = codec;
 	return SWITCH_STATUS_SUCCESS;
 }
@@ -1165,6 +1201,15 @@
 	return status;
 }
 
+SWITCH_DECLARE(int32_t) switch_core_session_event_count(switch_core_session_t *session)
+{
+	if (session->event_queue) {
+		return (int32_t) switch_queue_size(session->event_queue);
+	}
+
+	return -1;
+}
+
 SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_event(switch_core_session_t *session, switch_event_t **event)
 	 
 {
@@ -2474,7 +2519,9 @@
 	pool = NULL;
 
 	switch_mutex_lock(runtime.session_table_mutex);
-	runtime.session_count--;
+	if (runtime.session_count) {
+		runtime.session_count--;
+	}
 	switch_mutex_unlock(runtime.session_table_mutex);
 }
 
@@ -2837,14 +2884,18 @@
 									 switch_event_get_header(event, "channel-state")
 									 );
 		break;
-	case SWITCH_EVENT_CHANNEL_EXECUTE:
-		sql = switch_core_db_mprintf("update channels set application='%q',application_data='%q', read_codec='%q',read_rate='%q',write_codec='%q',write_rate='%q' where uuid='%q'",
-									 switch_event_get_header(event, "application"),
-									 switch_event_get_header(event, "application-data"),
+	case SWITCH_EVENT_CODEC:
+		sql = switch_core_db_mprintf("update channels set read_codec='%q',read_rate='%q',write_codec='%q',write_rate='%q' where uuid='%q'",
 									 switch_event_get_header(event, "channel-read-codec-name"),
 									 switch_event_get_header(event, "channel-read-codec-rate"),
 									 switch_event_get_header(event, "channel-write-codec-name"),
 									 switch_event_get_header(event, "channel-write-codec-rate"),
+									 switch_event_get_header(event, "unique-id"));
+		break;
+	case SWITCH_EVENT_CHANNEL_EXECUTE:
+		sql = switch_core_db_mprintf("update channels set application='%q',application_data='%q' where uuid='%q'",
+									 switch_event_get_header(event, "application"),
+									 switch_event_get_header(event, "application-data"),
 									 switch_event_get_header(event, "unique-id")
 									 );
 		break;
@@ -2923,10 +2974,36 @@
 SWITCH_DECLARE(void) switch_core_set_globals(void)
 {
 #ifdef WIN32
-#define BUFSIZE 50
+#define BUFSIZE 1024
     char lpPathBuffer[BUFSIZE];
 	DWORD dwBufSize=BUFSIZE;
-#endif
+	char exePath[1024];
+	char *lastbacklash;
+	GetModuleFileName( NULL, exePath, BUFSIZE );
+	lastbacklash = strrchr( exePath, '\\');
+	exePath[(lastbacklash - exePath + 1)] = '\0';
+	if (!SWITCH_GLOBAL_dirs.base_dir && (SWITCH_GLOBAL_dirs.base_dir = (char *) malloc(BUFSIZE))) {
+		snprintf(SWITCH_GLOBAL_dirs.base_dir, BUFSIZE, "%s", exePath);
+	}
+	if (!SWITCH_GLOBAL_dirs.mod_dir && (SWITCH_GLOBAL_dirs.mod_dir = (char *) malloc(BUFSIZE))) {
+		snprintf(SWITCH_GLOBAL_dirs.mod_dir, BUFSIZE, "%smod", exePath);
+	}
+	if (!SWITCH_GLOBAL_dirs.conf_dir && (SWITCH_GLOBAL_dirs.conf_dir = (char *) malloc(BUFSIZE))) {
+		snprintf(SWITCH_GLOBAL_dirs.conf_dir, BUFSIZE, "%sconf", exePath);
+	}
+	if (!SWITCH_GLOBAL_dirs.log_dir && (SWITCH_GLOBAL_dirs.log_dir = (char *) malloc(BUFSIZE))) {
+		snprintf(SWITCH_GLOBAL_dirs.log_dir, BUFSIZE, "%slog", exePath);
+	}
+	if (!SWITCH_GLOBAL_dirs.db_dir && (SWITCH_GLOBAL_dirs.db_dir = (char *) malloc(BUFSIZE))) {
+		snprintf(SWITCH_GLOBAL_dirs.db_dir, BUFSIZE, "%sdb", exePath);
+	}
+	if (!SWITCH_GLOBAL_dirs.script_dir && (SWITCH_GLOBAL_dirs.script_dir = (char *) malloc(BUFSIZE))) {
+		snprintf(SWITCH_GLOBAL_dirs.script_dir, BUFSIZE, "%sscripts", exePath);
+	}
+	if (!SWITCH_GLOBAL_dirs.htdocs_dir && (SWITCH_GLOBAL_dirs.htdocs_dir = (char *) malloc(BUFSIZE))) {
+		snprintf(SWITCH_GLOBAL_dirs.htdocs_dir, BUFSIZE, "%shtdocs", exePath);
+	}
+#else
 	SWITCH_GLOBAL_dirs.base_dir = SWITCH_PREFIX_DIR;
 	SWITCH_GLOBAL_dirs.mod_dir = SWITCH_MOD_DIR;
 	SWITCH_GLOBAL_dirs.conf_dir = SWITCH_CONF_DIR;
@@ -2934,12 +3011,15 @@
 	SWITCH_GLOBAL_dirs.db_dir = SWITCH_DB_DIR;
 	SWITCH_GLOBAL_dirs.script_dir = SWITCH_SCRIPT_DIR;
 	SWITCH_GLOBAL_dirs.htdocs_dir = SWITCH_HTDOCS_DIR;
+#endif
 #ifdef SWITCH_TEMP_DIR
 	SWITCH_GLOBAL_dirs.temp_dir = SWITCH_TEMP_DIR;
 #else
 #ifdef WIN32
 	GetTempPath(dwBufSize, lpPathBuffer);
-	SWITCH_GLOBAL_dirs.temp_dir = lpPathBuffer;
+	if (!SWITCH_GLOBAL_dirs.htdocs_dir && (SWITCH_GLOBAL_dirs.htdocs_dir = (char *) malloc(BUFSIZE))) {
+		snprintf(SWITCH_GLOBAL_dirs.htdocs_dir, BUFSIZE, "%s", lpPathBuffer);
+	}
 #else
 	SWITCH_GLOBAL_dirs.temp_dir = "/tmp/";
 #endif
@@ -3089,8 +3169,66 @@
 	runtime.initiated = switch_time_now();
 	return SWITCH_STATUS_SUCCESS;
 }
+#ifdef SIGPIPE
+static int handle_SIGPIPE(int sig)
+{
+	if(sig);
+	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Sig Pipe!\n");
+	return 0;
+}
+#endif
+#ifdef TRAP_BUS
+static int handle_SIGBUS(int sig)
+{
+	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Sig BUS!\n");
+	return 0;
+}
+#endif
 
+/* no ctl-c mofo */
+static int handle_SIGINT(int sig)
+{
+	if (sig);
+	return 0;
+}
+SWITCH_DECLARE(switch_status_t) switch_core_init_and_modload(char *console, const char **err)
+{
+	switch_event_t *event;
+	if (switch_core_init(console, err) != SWITCH_STATUS_SUCCESS) {
+		return SWITCH_STATUS_GENERR;
+	}
 
+	/* set signal handlers */
+	signal(SIGINT, (void *) handle_SIGINT);
+#ifdef SIGPIPE
+	signal(SIGPIPE, (void *) handle_SIGPIPE);
+#endif
+#ifdef TRAP_BUS
+	signal(SIGBUS, (void *) handle_SIGBUS);
+#endif
+	
+	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Bringing up environment.\n");
+	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Loading Modules.\n");
+	if (switch_loadable_module_init() != SWITCH_STATUS_SUCCESS) {
+		*err = "Cannot load modules";
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Error: %s", err);
+		return SWITCH_STATUS_GENERR;
+	}
+
+	if (switch_event_create(&event, SWITCH_EVENT_STARTUP) == SWITCH_STATUS_SUCCESS) {
+		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Event-Info", "System Ready");
+		switch_event_fire(&event);
+	}
+
+#ifdef HAVE_MLOCKALL
+	mlockall(MCL_CURRENT|MCL_FUTURE);
+#endif
+
+	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\nFreeSWITCH Version %s Started.\nCrash Protection [%s]\nMax Sessions[%u]\n\n", SWITCH_VERSION_FULL, __CP, switch_core_session_limit(0));
+	return SWITCH_STATUS_SUCCESS;
+
+}
+
 SWITCH_DECLARE(void) switch_core_measure_time(switch_time_t total_ms, switch_core_time_duration_t *duration)
 {
     switch_time_t temp = total_ms / 1000;
@@ -3115,30 +3253,52 @@
 
 SWITCH_DECLARE(switch_status_t) switch_core_destroy(void)
 {
+	switch_event_t *event;
+	if (switch_event_create(&event, SWITCH_EVENT_SHUTDOWN) == SWITCH_STATUS_SUCCESS) {
+		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Event-Info", "System Shutting Down");
+		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, "Closing Event Engine.\n");
 	switch_event_shutdown();
-	switch_log_shutdown();
-
+	
 	switch_queue_push(runtime.sql_queue, NULL);
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Waiting for unfinished SQL transactions\n");
 	while (switch_queue_size(runtime.sql_queue) > 0) {
-		switch_yield(1000);
+		switch_yield(10000);
 	}
 	switch_core_db_close(runtime.db);
 	switch_core_db_close(runtime.event_db);
 	switch_xml_destroy();
 
-	if (runtime.memory_pool) {
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Unallocating memory pool.\n");
-		apr_pool_destroy(runtime.memory_pool);
-		apr_terminate();
-	}
+	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Finalizing Shutdown.\n");
+	switch_log_shutdown();
 	
 	if(runtime.console != stdout && runtime.console != stderr) {
 		fclose(runtime.console);
 		runtime.console = NULL;
 	}
+
+	if (runtime.memory_pool) {
+		apr_pool_destroy(runtime.memory_pool);
+		apr_terminate();
+	}
+
+#ifdef WIN32
+	free(SWITCH_GLOBAL_dirs.base_dir);
+	free(SWITCH_GLOBAL_dirs.mod_dir);
+	free(SWITCH_GLOBAL_dirs.conf_dir);
+	free(SWITCH_GLOBAL_dirs.log_dir);
+	free(SWITCH_GLOBAL_dirs.db_dir);
+	free(SWITCH_GLOBAL_dirs.script_dir);
+	free(SWITCH_GLOBAL_dirs.htdocs_dir);
+	free(SWITCH_GLOBAL_dirs.temp_dir);
+#endif
 
 	return SWITCH_STATUS_SUCCESS;
 }

Modified: freeswitch/branches/mishehu/src/switch_event.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch_event.c	(original)
+++ freeswitch/branches/mishehu/src/switch_event.c	Sun Aug 27 11:43:21 2006
@@ -113,6 +113,7 @@
 	"MODULE_LOAD",
 	"DTMF",
 	"MESSAGE",
+	"CODEC",
 	"ALL"
 };
 
@@ -393,6 +394,15 @@
 	return NULL;
 }
 
+SWITCH_DECLARE(char *) switch_event_get_body(switch_event_t *event)
+{
+	if (event) {
+		return event->body;
+	}
+
+	return NULL;
+}
+
 SWITCH_DECLARE(switch_status_t) switch_event_add_header(switch_event_t *event, switch_stack_t stack, char *header_name,
 													  char *fmt, ...)
 {
@@ -441,12 +451,14 @@
 	char data[2048];
 
 	va_list ap;
-	va_start(ap, fmt);
-	vsnprintf(data, sizeof(data), fmt, ap);
-	va_end(ap);
+	if (fmt) {
+		va_start(ap, fmt);
+		ret = vsnprintf(data, sizeof(data), fmt, ap);
+		va_end(ap);
+	}
 
 	if (ret == -1) {
-		return SWITCH_STATUS_MEMERR;
+		return SWITCH_STATUS_GENERR;
 	} else {
 		event->body = DUP(data);
 		return SWITCH_STATUS_SUCCESS;
@@ -621,7 +633,7 @@
 			switch_xml_t xbody = NULL;
 
 			add_xml_header(xml, "Content-Length", blena, off++);
-			if ((xbody = switch_xml_add_child_d(xml, "body", 0))) {
+			if ((xbody = switch_xml_add_child_d(xml, "body", off++))) {
 				switch_xml_set_txt_d(xbody, body);
 			}
 		}

Modified: freeswitch/branches/mishehu/src/switch_ivr.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch_ivr.c	(original)
+++ freeswitch/branches/mishehu/src/switch_ivr.c	Sun Aug 27 11:43:21 2006
@@ -439,7 +439,7 @@
 					  comment,
 					  date);
 
-
+	assert(read_codec != NULL);
 	interval = read_codec->implementation->microseconds_per_frame / 1000;
 
 
@@ -541,7 +541,7 @@
 
 		if (fh->speed > 2) {
 			fh->speed = 2;
-		} else if(fh->speed < -2) {
+		} else if (fh->speed < -2) {
 			fh->speed = -2;
 		}
 		
@@ -1140,97 +1140,406 @@
 	/*.on_hold */ audio_bridge_on_hold,
 };
 
+struct key_collect {
+	char *key;
+	char *file;
+	switch_core_session_t *session;
+};
 
-SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session, 
-															   switch_core_session_t *peer_session,
-															   unsigned int timelimit,
-															   switch_input_callback_function_t input_callback,
-															   void *session_data,
-															   void *peer_session_data)
-															   
 
-															   
+static void *SWITCH_THREAD_FUNC collect_thread_run(switch_thread_t *thread, void *obj)
 {
-	switch_core_thread_session_t *this_audio_thread, *other_audio_thread;
-	switch_channel_t *caller_channel, *peer_channel;
+	struct key_collect *collect = (struct key_collect *) obj;
+	switch_channel_t *channel = switch_core_session_get_channel(collect->session);
+	char buf[10] = "";
+	char *p, term;
+
+
+	if (!strcasecmp(collect->key, "exec")) {
+		char *data;
+		const switch_application_interface_t *application_interface;
+		char *app_name, *app_data;
+
+		if (!(data = collect->file)) {
+			goto wbreak;
+		}
+
+		app_name = data;
+
+		if ((app_data = strchr(app_name, ' '))) {
+			*app_data++ = '\0';
+		}
+		
+		if ((application_interface = switch_loadable_module_get_application_interface(app_name)) == 0) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Application %s\n", app_name);
+			switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+			goto wbreak;
+		}
+
+		if (!application_interface->application_function) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No Function for %s\n", app_name);
+			switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+			goto wbreak;
+		}
+
+		application_interface->application_function(collect->session, app_data);
+		if (switch_channel_get_state(channel) < CS_HANGUP) {
+			switch_channel_set_flag(channel, CF_WINNER);
+		}
+		goto wbreak;
+	}
+
+	if (!switch_channel_ready(channel)) {
+		switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+		goto wbreak;
+	}
+
+	while(switch_channel_ready(channel)) {
+		memset(buf, 0, sizeof(buf));
+
+		if (collect->file) {
+
+			switch_ivr_play_file(collect->session, NULL, collect->file, NULL, NULL, buf, sizeof(buf));
+		} else {
+			switch_ivr_collect_digits_count(collect->session, buf, sizeof(buf), 1, "", &term, 0);
+		}
+
+		for(p = buf; *p; p++) {
+			if (*collect->key == *p) {
+				switch_channel_set_flag(channel, CF_WINNER);
+				goto wbreak;
+			}
+		}
+	}
+ wbreak:
+
+	return NULL;
+}
+
+static void launch_collect_thread(struct key_collect *collect)
+{
+	switch_thread_t *thread;
+	switch_threadattr_t *thd_attr = NULL;
+	
+	switch_threadattr_create(&thd_attr, switch_core_session_get_pool(collect->session));
+	switch_threadattr_detach_set(thd_attr, 1);
+	switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
+	switch_thread_create(&thread, thd_attr, collect_thread_run, collect, switch_core_session_get_pool(collect->session));
+}
+
+static uint8_t check_channel_status(switch_channel_t **peer_channels,
+									switch_core_session_t **peer_sessions,
+									uint32_t len,
+									int32_t *idx,
+									char *file,
+									char *key)
+{
+
+	uint32_t i;
+	uint32_t hups = 0;	
+	*idx = -1;
+	
+	for (i = 0; i < len; i++) {
+		if (!peer_channels[i]) {
+			continue;
+		}
+		if (switch_channel_get_state(peer_channels[i]) >= CS_HANGUP) {
+			hups++;
+		} else if ((switch_channel_test_flag(peer_channels[i], CF_ANSWERED) || (len == 1 && switch_channel_test_flag(peer_channels[0], CF_EARLY_MEDIA))) && 
+				   !switch_channel_test_flag(peer_channels[i], CF_TAGGED)) {
+
+			if (key) {
+				struct key_collect *collect;
+				
+				if ((collect = switch_core_session_alloc(peer_sessions[i], sizeof(*collect)))) {
+					switch_channel_set_flag(peer_channels[i], CF_TAGGED);
+					collect->key = key;
+					if (file) {
+						collect->file = switch_core_session_strdup(peer_sessions[i], file);
+					}
+				
+					collect->session = peer_sessions[i];
+					launch_collect_thread(collect);
+				}
+			} else {
+				*idx = i;
+				return 0;
+					
+			}
+		} else if (switch_channel_test_flag(peer_channels[i], CF_WINNER)) {
+			*idx = i;
+			return 0;
+		}
+	}
+
+	if (hups == len) {
+		return 0;
+	} else {
+		return 1;
+	}
+	
+}
+
+#define MAX_PEERS 256
+SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *session,
+													 switch_core_session_t **bleg,
+													 char *bridgeto,
+													 uint32_t timelimit_sec,
+													 const switch_state_handler_table_t *table,
+													 char *cid_name_override,
+													 char *cid_num_override,
+													 switch_caller_profile_t *caller_profile_override
+													 )
+										  
+{
+	char *peer_names[MAX_PEERS];
+	switch_core_session_t *peer_session, *peer_sessions[MAX_PEERS];
+	switch_caller_profile_t *caller_profiles[MAX_PEERS], *caller_caller_profile;
+	char *chan_type = NULL, *chan_data;
+	switch_channel_t *peer_channel = NULL, *peer_channels[MAX_PEERS];
 	time_t start;
-	int stream_id = 0;
 	switch_frame_t *read_frame = NULL;
 	switch_status_t status = SWITCH_STATUS_SUCCESS;
+	switch_channel_t *caller_channel = NULL;
+	switch_memory_pool_t *pool = NULL;
+	char *data = NULL;
+	int i, argc;
+	int32_t idx = -1;
+	switch_codec_t write_codec = {0};
+	switch_frame_t write_frame = {0};
+	uint8_t err = 0, fdata[1024];
+	char *file = NULL, *key = NULL, *odata, *var;
+
+	write_frame.data = fdata;
 	
+	*bleg = NULL;
+	odata = strdup(bridgeto);
+	data = odata;
 
-	caller_channel = switch_core_session_get_channel(session);
-	assert(caller_channel != NULL);
+	if (!strncasecmp(data, "confirm=", 8)) {
+		data += 8;
+		file = data;
+		if ((data = strchr(file, ';'))) {
+			*data++ = '\0';
+			if ((key = strchr(file, ':'))) {
+				*key++ = '\0';
+			} else {
+				err++;
+			}
+		} else {
+			err++;
+		}
+	}
 
-	switch_channel_set_flag(caller_channel, CF_ORIGINATOR);
+	if (err) {
+		status = SWITCH_STATUS_GENERR;
+		goto done;
+	}
 
-	peer_channel = switch_core_session_get_channel(peer_session);
-	assert(peer_channel != NULL);
+	if (session) {
+		caller_channel = switch_core_session_get_channel(session);
+		assert(caller_channel != NULL);
 
-	other_audio_thread = switch_core_session_alloc(peer_session, sizeof(switch_core_thread_session_t));
-	this_audio_thread = switch_core_session_alloc(peer_session, sizeof(switch_core_thread_session_t));
+		switch_channel_set_variable(caller_channel, "originate_disposition", "failure");
 
-	other_audio_thread->objs[0] = session;
-	other_audio_thread->objs[1] = peer_session;
-	other_audio_thread->objs[2] = &stream_id;
-	other_audio_thread->objs[3] = (void *) input_callback;
-	other_audio_thread->objs[4] = session_data;
-	other_audio_thread->objs[5] = this_audio_thread;
-	other_audio_thread->running = 5;
+		if ((var = switch_channel_get_variable(caller_channel, "group_confirm_key"))) {
+			key = switch_core_session_strdup(session, var);
+			if ((var = switch_channel_get_variable(caller_channel, "group_confirm_file"))) {
+				file = switch_core_session_strdup(session, var);
+			}
+		}
+	}
+	
 
-	this_audio_thread->objs[0] = peer_session;
-	this_audio_thread->objs[1] = session;
-	this_audio_thread->objs[2] = &stream_id;
-	this_audio_thread->objs[3] = (void *) input_callback;
-	this_audio_thread->objs[4] = peer_session_data;
-	this_audio_thread->objs[5] = other_audio_thread;
-	this_audio_thread->running = 2;
 
-	switch_channel_add_state_handler(peer_channel, &audio_bridge_peer_state_handlers);
+	if (file && !strcmp(file, "undef")) {
+		file = NULL;
+	}
 
-	if (switch_core_session_runing(peer_session)) {
-		switch_channel_set_state(peer_channel, CS_RING);
-	} else {
-		switch_core_session_thread_launch(peer_session);
+	argc = switch_separate_string(data, '&', peer_names, (sizeof(peer_names) / sizeof(peer_names[0])));
+	
+	for (i = 0; i < argc; i++) {
+		
+		chan_type = peer_names[i];
+		if ((chan_data = strchr(chan_type, '/')) != 0) {
+			*chan_data = '\0';
+			chan_data++;
+		}
+	
+		if (session) {
+			if (!switch_channel_ready(caller_channel)) {
+				status = SWITCH_STATUS_FALSE;
+				goto done;
+			}
+
+			caller_caller_profile = caller_profile_override ? caller_profile_override : switch_channel_get_caller_profile(caller_channel);
+			
+			if (!cid_name_override) {
+				cid_name_override = caller_caller_profile->caller_id_name;
+			}
+			if (!cid_num_override) {
+				cid_num_override = caller_caller_profile->caller_id_number;
+			}
+
+			caller_profiles[i] = switch_caller_profile_new(switch_core_session_get_pool(session),
+														   caller_caller_profile->username,
+														   caller_caller_profile->dialplan,
+														   cid_name_override,
+														   cid_num_override,
+														   caller_caller_profile->network_addr, 
+														   NULL,
+														   NULL, 
+														   caller_caller_profile->rdnis,
+														   caller_caller_profile->source,
+														   caller_caller_profile->context,
+														   chan_data);
+			pool = NULL;
+		} else {
+			if (!cid_name_override) {
+				cid_name_override = "FreeSWITCH";
+			}
+			if (!cid_num_override) {
+				cid_num_override = "0000000000";
+			}
+
+			if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
+				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
+				status = SWITCH_STATUS_TERM;
+				goto done;
+			}
+
+			if (caller_profile_override) {
+				caller_profiles[i] = switch_caller_profile_new(pool,
+															   caller_profile_override->username,
+															   caller_profile_override->dialplan,
+															   caller_profile_override->caller_id_name,
+															   caller_profile_override->caller_id_number,
+															   caller_profile_override->network_addr, 
+															   caller_profile_override->ani,
+															   caller_profile_override->ani2,
+															   caller_profile_override->rdnis,
+															   caller_profile_override->source,
+															   caller_profile_override->context,
+															   chan_data);
+			} else {
+				caller_profiles[i] = switch_caller_profile_new(pool,
+															   NULL,
+															   NULL,
+															   cid_name_override,
+															   cid_num_override,
+															   NULL,
+															   NULL, 
+															   NULL,
+															   NULL,
+															   __FILE__,
+															   NULL,
+															   chan_data);
+			}
+		}
+
+		if (switch_core_session_outgoing_channel(session, chan_type, caller_profiles[i], &peer_sessions[i], pool) != SWITCH_STATUS_SUCCESS) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
+			if (pool) {
+				switch_core_destroy_memory_pool(&pool);
+			}
+			caller_profiles[i] = NULL;
+			peer_channels[i] = NULL;
+			peer_sessions[i] = NULL;
+			continue;
+		} 
+		pool = NULL;
+	
+		peer_channels[i] = switch_core_session_get_channel(peer_sessions[i]);
+		assert(peer_channels[i] != NULL);
+		
+		if (!table) {
+			table = &audio_bridge_peer_state_handlers;
+		}
+
+		switch_channel_add_state_handler(peer_channels[i], table);
+
+		if (switch_core_session_runing(peer_sessions[i])) {
+			switch_channel_set_state(peer_channels[i], CS_RING);
+		} else {
+			switch_core_session_thread_launch(peer_sessions[i]);
+		}
 	}
 
 	time(&start);
 
 	for (;;) {
-		int state = switch_channel_get_state(peer_channel);
-		if (state >= CS_RING) {
-			break;
-		}
+		uint32_t valid_channels = 0;
+		for (i = 0; i < argc; i++) {
+			int state;
+
+			if (!peer_channels[i]) {
+				continue;
+			}
+			valid_channels++;
+			state = switch_channel_get_state(peer_channels[i]);
+			
+			if (state >= CS_RING) {
+				goto endfor1;
+			}
 		
-		if (!switch_channel_ready(caller_channel)) {
-			break;
-		}
+			if (caller_channel && !switch_channel_ready(caller_channel)) {
+				break;
+			}
 		
-		if ((time(NULL) - start) > (time_t)timelimit) {
-			break;
+			if ((time(NULL) - start) > (time_t)timelimit_sec) {
+				break;
+			}
+			switch_yield(1000);
 		}
-		switch_yield(1000);
+
+		if (valid_channels == 0) {
+			status = SWITCH_STATUS_GENERR;
+			goto done;
+		}
+
 	}
+ endfor1:
 
-	switch_channel_pre_answer(caller_channel);
-	
+	if (session) {
+		switch_codec_t *read_codec = NULL;
 
-	while (switch_channel_ready(caller_channel) &&
-		   switch_channel_ready(peer_channel) &&
-		   !switch_channel_test_flag(peer_channel, CF_ANSWERED) &&
-		   !switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA) &&
-		   ((time(NULL) - start) < (time_t)timelimit)) {
-		
+		switch_channel_pre_answer(caller_channel);
+		read_codec = switch_core_session_get_read_codec(session);
+
+		assert(read_codec != NULL);
+		if (switch_core_codec_init(&write_codec,
+								   "L16",
+								   read_codec->implementation->samples_per_second,
+								   read_codec->implementation->microseconds_per_frame / 1000,
+								   1,
+								   SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
+								   NULL,
+								   pool) == SWITCH_STATUS_SUCCESS) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Success L16@%uhz 1 channel %dms\n",
+							  read_codec->implementation->samples_per_second,
+							  read_codec->implementation->microseconds_per_frame / 1000);
+			write_frame.codec = &write_codec;
+			write_frame.datalen = read_codec->implementation->bytes_per_frame;
+			write_frame.samples = write_frame.datalen / 2;
+			memset(write_frame.data, 255, write_frame.datalen);
+		} else {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec Error!");
+			switch_channel_hangup(caller_channel, SWITCH_CAUSE_NORMAL_TEMPORARY_FAILURE);
+		}
+	}
+
+	while ((!caller_channel || switch_channel_ready(caller_channel)) && 
+		   check_channel_status(peer_channels, peer_sessions, argc, &idx, file, key) && ((time(NULL) - start) < (time_t)timelimit_sec)) {
+
 		/* read from the channel while we wait if the audio is up on it */
-		if (switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA)) {
+		if (session && (switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA))) {
 			switch_status_t status = switch_core_session_read_frame(session, &read_frame, 1000, 0);
 			
 			if (!SWITCH_READ_ACCEPTABLE(status)) {
 				break;
 			}
 			if (read_frame) {
-				//memset(read_frame->data, 0, read_frame->datalen);
-				if (switch_core_session_write_frame(session, read_frame, 1000, 0) != SWITCH_STATUS_SUCCESS) {
+				if (switch_core_session_write_frame(session, &write_frame, 1000, 0) != SWITCH_STATUS_SUCCESS) {
 					break;
 				}
 			}
@@ -1238,8 +1547,103 @@
 		} else {
 			switch_yield(1000);
 		}
+		
+	}
 
+	if (session) {
+		switch_core_session_reset(session);
 	}
+
+	for (i = 0; i < argc; i++) {
+		if (!peer_channels[i]) {
+			continue;
+		}
+		if (i != idx) {
+			switch_channel_hangup(peer_channels[i], SWITCH_CAUSE_LOSE_RACE);
+		}
+	}
+
+
+	if (idx > -1) {
+		peer_session = peer_sessions[idx];
+		peer_channel = peer_channels[idx];
+	} else {
+		status = SWITCH_STATUS_FALSE;
+		goto done;
+	}
+
+	if (caller_channel && switch_channel_test_flag(peer_channel, CF_ANSWERED)) {
+		switch_channel_answer(caller_channel);
+	}
+
+	if (switch_channel_test_flag(peer_channel, CF_ANSWERED) || switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA)) {
+		*bleg = peer_session;
+		if (caller_channel) {
+			switch_channel_set_variable(caller_channel, "originate_disposition", "call accepted");
+		}
+		status = SWITCH_STATUS_SUCCESS;
+	} else {
+		if (caller_channel) {
+			switch_channel_set_variable(caller_channel, "originate_disposition", "no answer");
+			switch_channel_hangup(caller_channel, SWITCH_CAUSE_NO_ANSWER);
+		}
+		status = SWITCH_STATUS_FALSE;
+	}
+
+
+ done:
+	if (odata) {
+		free(odata);
+	}
+	if (write_codec.implementation) {
+		switch_core_codec_destroy(&write_codec);
+	}
+	return status;
+}
+
+
+SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session, 
+																 switch_core_session_t *peer_session,
+																 switch_input_callback_function_t input_callback,
+																 void *session_data,
+																 void *peer_session_data)
+	 
+
+															   
+{
+	switch_core_thread_session_t *this_audio_thread, *other_audio_thread;
+	switch_channel_t *caller_channel, *peer_channel;
+	int stream_id = 0;
+	switch_status_t status = SWITCH_STATUS_SUCCESS;
+	
+	caller_channel = switch_core_session_get_channel(session);
+	assert(caller_channel != NULL);
+
+	switch_channel_set_flag(caller_channel, CF_ORIGINATOR);
+
+	peer_channel = switch_core_session_get_channel(peer_session);
+	assert(peer_channel != NULL);
+
+	other_audio_thread = switch_core_session_alloc(peer_session, sizeof(switch_core_thread_session_t));
+	this_audio_thread = switch_core_session_alloc(peer_session, sizeof(switch_core_thread_session_t));
+
+	other_audio_thread->objs[0] = session;
+	other_audio_thread->objs[1] = peer_session;
+	other_audio_thread->objs[2] = &stream_id;
+	other_audio_thread->objs[3] = (void *) input_callback;
+	other_audio_thread->objs[4] = session_data;
+	other_audio_thread->objs[5] = this_audio_thread;
+	other_audio_thread->running = 5;
+
+	this_audio_thread->objs[0] = peer_session;
+	this_audio_thread->objs[1] = session;
+	this_audio_thread->objs[2] = &stream_id;
+	this_audio_thread->objs[3] = (void *) input_callback;
+	this_audio_thread->objs[4] = peer_session_data;
+	this_audio_thread->objs[5] = other_audio_thread;
+	this_audio_thread->running = 2;
+
+	switch_channel_add_state_handler(peer_channel, &audio_bridge_peer_state_handlers);
 
 	if (switch_channel_test_flag(peer_channel, CF_ANSWERED)) {
 		switch_channel_answer(caller_channel);

Modified: freeswitch/branches/mishehu/src/switch_log.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch_log.c	(original)
+++ freeswitch/branches/mishehu/src/switch_log.c	Sun Aug 27 11:43:21 2006
@@ -118,7 +118,7 @@
 	assert(obj == NULL || obj != NULL);
 	THREAD_RUNNING = 1;
 
-	for(;;) {
+	while(THREAD_RUNNING == 1) {
 		void *pop = NULL;
 		switch_log_node_t *node = NULL;
 		switch_log_binding_t *binding;
@@ -222,23 +222,23 @@
 					switch_event_fire(&event);
 				}
 		} else {
-			if (level == SWITCH_LOG_CONSOLE || !THREAD_RUNNING) {
+			if (level == SWITCH_LOG_CONSOLE || !LOG_QUEUE || !THREAD_RUNNING) {
 				fprintf(handle, data);
-			} 
-
-			if (level <= MAX_LEVEL) {
-				switch_log_node_t *node = malloc(sizeof(*node));
-				node->data = data;
-				node->file = strdup(filep);
-				node->func = strdup(func);
-				node->line = line;
-				node->level = level;
-				node->content = content;
-				node->timestamp = now;
-				switch_queue_push(LOG_QUEUE, node);
-			} else {
 				free(data);
-			}
+			} else if (level <= MAX_LEVEL) {
+				switch_log_node_t *node;
+
+				if ((node = malloc(sizeof(*node)))) {
+					node->data = data;
+					node->file = strdup(filep);
+					node->func = strdup(func);
+					node->line = line;
+					node->level = level;
+					node->content = content;
+					node->timestamp = now;
+					switch_queue_push(LOG_QUEUE, node);
+				}
+			} 
 		}
 	}
 
@@ -276,7 +276,11 @@
 
 SWITCH_DECLARE(switch_status_t) switch_log_shutdown(void)
 {
+	THREAD_RUNNING = -1;
 	switch_queue_push(LOG_QUEUE, NULL);
+	while (THREAD_RUNNING) {
+		switch_yield(1000);
+	}
 	return SWITCH_STATUS_SUCCESS;
 }
 

Modified: freeswitch/branches/mishehu/src/switch_stun.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch_stun.c	(original)
+++ freeswitch/branches/mishehu/src/switch_stun.c	Sun Aug 27 11:43:21 2006
@@ -24,6 +24,7 @@
  * Contributor(s):
  * 
  * Anthony Minessale II <anthmct at yahoo.com>
+ * Fanzhou Zhao <fanzhou at gmail.com> 2006-08-22 (Bugfix 2357-2358)
  *
  *
  * switch_stun.c STUN (Simple Traversal of UDP over NAT)
@@ -91,18 +92,18 @@
 {
 	char chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
 	int max;
-	uint8_t x;
+	uint16_t x;
 
 	if (!set) {
 		set = chars;
 	}
 
-	max = (int)strlen(set) - 1;
+	max = (int)strlen(set);
 
 	srand((unsigned int)apr_time_now());
 
 	for(x = 0; x < len; x++) {
-		int j = 1+(int)(max*1.0*rand()/(RAND_MAX+1.0));
+		int j = (int)(max*1.0*rand()/(RAND_MAX+1.0));
 		buf[x] = set[j];
 	}
 }

Modified: freeswitch/branches/mishehu/src/switch_utils.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch_utils.c	(original)
+++ freeswitch/branches/mishehu/src/switch_utils.c	Sun Aug 27 11:43:21 2006
@@ -52,7 +52,7 @@
 
 SWITCH_DECLARE(char) switch_rfc2833_to_char(int event)
 {
-	if (event > -1 && event < sizeof(RFC2833_CHARS)) {
+	if (event > -1 && event < (int32_t) sizeof(RFC2833_CHARS)) {
 		return RFC2833_CHARS[event];
 	}
 	return '\0';
@@ -75,8 +75,9 @@
 SWITCH_DECLARE(unsigned int) switch_separate_string(char *buf, char delim, char **array, int arraylen)
 {
 	int argc;
-	char *scan;
-	int paren = 0;
+	char *ptr;
+	int quot = 0;
+	char qc = '"';
 
 	if (!buf || !array || !arraylen) {
 		return 0;
@@ -84,25 +85,33 @@
 
 	memset(array, 0, arraylen * sizeof(*array));
 
-	scan = buf;
+	ptr = buf;
 
-	for (argc = 0; *scan && (argc < arraylen - 1); argc++) {
-		array[argc] = scan;
-		for (; *scan; scan++) {
-			if (*scan == '(')
-				paren++;
-			else if (*scan == ')') {
-				if (paren)
-					paren--;
-			} else if ((*scan == delim) && !paren) {
-				*scan++ = '\0';
+	for (argc = 0; *ptr && (argc < arraylen - 1); argc++) {
+		array[argc] = ptr;
+		for (; *ptr; ptr++) {
+			if (*ptr == qc) {
+				if (quot) {
+					quot--;
+				} else {
+					quot++;
+				}
+			} else if ((*ptr == delim) && !quot) {
+				*ptr++ = '\0';
 				break;
 			}
 		}
 	}
 
-	if (*scan) {
-		array[argc++] = scan;
+	if (*ptr) {
+		char *e;
+		if (*ptr == qc) {
+			ptr++;
+		}
+		if ((e = strchr(ptr, qc))) {
+			*e = '\0';
+		}
+		array[argc++] = ptr;
 	}
 
 	return argc;

Modified: freeswitch/branches/mishehu/src/switch_xml.c
==============================================================================
--- freeswitch/branches/mishehu/src/switch_xml.c	(original)
+++ freeswitch/branches/mishehu/src/switch_xml.c	Sun Aug 27 11:43:21 2006
@@ -1012,7 +1012,7 @@
     char *txt = (xml->parent) ? xml->parent->txt : "";
     switch_size_t off = 0;
 	uint32_t lcount = 0;
-
+	
     // parent character content up to this tag
     *s = switch_xml_ampencode(txt + start, xml->off - start, s, len, max, 0);
 
@@ -1045,11 +1045,13 @@
         switch_xml_ampencode(attr[i][j + 1], 0, s, len, max, 1);
         *len += sprintf(*s + *len, "\"");
     }
-    *len += sprintf(*s + *len, xml->child ? ">\n" : "/>\n");
 
+    *len += sprintf(*s + *len, (xml->child || xml->txt) ? ">" : "/>\n");
+
 	if (xml->child) {
 		(*count)++;
 		*s = switch_xml_toxml_r(xml->child, s, len, max, 0, attr, count);
+
 	} else {
 		*s = switch_xml_ampencode(xml->txt, 0, s, len, max, 0);  //data
 	}
@@ -1058,10 +1060,10 @@
         *s = realloc(*s, *max += SWITCH_XML_BUFSIZE);
 
 
-	if (xml->child) {
-		for (lcount = 0; lcount < *count; lcount++) {
-			*len += sprintf(*s + *len, "%s", XML_INDENT); // indent
-		}
+	if (xml->child || xml->txt) {
+		//for (lcount = 0; lcount < *count; lcount++) {
+		//*len += sprintf(*s + *len, "%s", XML_INDENT); // indent
+		//}
 		*len += sprintf(*s + (*len), "</%s>\n", xml->name); // close tag
 	}
 

Modified: freeswitch/branches/mishehu/w32/Setup/Setup.vdproj
==============================================================================
--- freeswitch/branches/mishehu/w32/Setup/Setup.vdproj	(original)
+++ freeswitch/branches/mishehu/w32/Setup/Setup.vdproj	Sun Aug 27 11:43:21 2006
@@ -21,12 +21,6 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_10A983E896C14286A47AAB6A8570EE6D"
-        "OwnerKey" = "8:_UNDEFINED"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
         "MsmKey" = "8:_1273F63008CF585CA0E063E436B4646F"
         "OwnerKey" = "8:_2D09AB81AB8D45FF97E9DFA4DAC3465D"
         "MsmSig" = "8:_UNDEFINED"
@@ -39,25 +33,19 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_1BD78CCD666E4BB5BE1168302E9613A2"
-        "OwnerKey" = "8:_UNDEFINED"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
         "MsmKey" = "8:_1CFB1AB04E024FC993E0EB4859DF8408"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_1F21CF104E90499E8F6BBD2136A52884"
+        "MsmKey" = "8:_2814E641538B42EFA83525986A9D5AC1"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_2814E641538B42EFA83525986A9D5AC1"
+        "MsmKey" = "8:_28FBC5A60B44423B8A2CC378347483CE"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -81,13 +69,13 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_36D88C9590054DCA8F6ABAE6F05C2FD6"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_329D8DAE6C01FCF026E9DFB48B932203"
+        "OwnerKey" = "8:_28FBC5A60B44423B8A2CC378347483CE"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_413E616556854689B457A68A06830A82"
+        "MsmKey" = "8:_3FBEFE0119944C6781F81104ECEF37CA"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -99,32 +87,26 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_53150E807A66E04034BACF0B4D81105A"
-        "OwnerKey" = "8:_E72980C058C646E0A7FAF423EB57EA6E"
+        "MsmKey" = "8:_59CFED0C4EC0492C945E4EBC04FE965F"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_53150E807A66E04034BACF0B4D81105A"
-        "OwnerKey" = "8:_F0B800E719294692A02518CFD8CBAEFF"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
         "MsmKey" = "8:_5A636BB90F7F4B86ACB8839EA2C899AA"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_6753CE9F969E43A2A50ADEC0245F58A4"
+        "MsmKey" = "8:_684D96FA2BDD46909367E651099D8C4E"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_684D96FA2BDD46909367E651099D8C4E"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_69EB1A147CC2428435BDCA35014C96E1"
+        "OwnerKey" = "8:_D2EF447106B24E67907DAED3D39CFBB1"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
@@ -147,6 +129,12 @@
         }
         "Entry"
         {
+        "MsmKey" = "8:_81546E20D5C640AC84C7B7E100280727"
+        "OwnerKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
         "MsmKey" = "8:_83062AA0528B40A59202BC7668F7132A"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
@@ -165,162 +153,210 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_1CFB1AB04E024FC993E0EB4859DF8408"
+        "MsmKey" = "8:_879085EF680EFDF6242DCB77439EC825"
+        "OwnerKey" = "8:_3FBEFE0119944C6781F81104ECEF37CA"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+        "MsmKey" = "8:_879085EF680EFDF6242DCB77439EC825"
         "OwnerKey" = "8:_F0B800E719294692A02518CFD8CBAEFF"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_EF14CB99F3414BB689D0CB0E6D6B8AB8"
+        "MsmKey" = "8:_879085EF680EFDF6242DCB77439EC825"
+        "OwnerKey" = "8:_D2EF447106B24E67907DAED3D39CFBB1"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_EE46A936D4054F7286909355BF2AE5D7"
+        "MsmKey" = "8:_879085EF680EFDF6242DCB77439EC825"
+        "OwnerKey" = "8:_59CFED0C4EC0492C945E4EBC04FE965F"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_E72980C058C646E0A7FAF423EB57EA6E"
+        "MsmKey" = "8:_91BA2668F87764F53188E93BC8D363D7"
+        "OwnerKey" = "8:_59CFED0C4EC0492C945E4EBC04FE965F"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_D1269F1E49D442CF8EAC96C23E60325D"
+        "MsmKey" = "8:_9A293E8A356A4959BB6E541B7DC213CD"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_B20769E090034897B32E3EA4EC1BA8A0"
+        "MsmKey" = "8:_A0D5F714A0F94250A1C39603B699AB82"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_A0D5F714A0F94250A1C39603B699AB82"
+        "MsmKey" = "8:_A164EF86C4B57E41C8CE77B48F39DAC7"
+        "OwnerKey" = "8:_D2EF447106B24E67907DAED3D39CFBB1"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_83C1B93AD71B4F8F9E074F9607B60DF1"
+        "MsmKey" = "8:_A3936A2727E73289F5804D5DA006FD0A"
+        "OwnerKey" = "8:_28FBC5A60B44423B8A2CC378347483CE"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_6753CE9F969E43A2A50ADEC0245F58A4"
+        "MsmKey" = "8:_A40E3F2045F44C60A8509FDFE47E6C45"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_4A285D260C3748A4BEFA6E5A9004D128"
+        "MsmKey" = "8:_A944ADCEDF884574A23F7BA5420A6BA1"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_318FCC99E8D143D6B4F9F534E63009B3"
+        "MsmKey" = "8:_AD2EB44FE6D548F2A8DA4F9F2CE817AC"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_2F2FEC549F02436EB87961BD1B9E5783"
+        "MsmKey" = "8:_B0A2E9B4C45D4098AFD734D0C4E3EAFB"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_2814E641538B42EFA83525986A9D5AC1"
+        "MsmKey" = "8:_B20769E090034897B32E3EA4EC1BA8A0"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
-        "OwnerKey" = "8:_1F21CF104E90499E8F6BBD2136A52884"
+        "MsmKey" = "8:_BB649A2C1ABE4895859025B09A240323"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_9A293E8A356A4959BB6E541B7DC213CD"
+        "MsmKey" = "8:_C105055EE271471A999CE7022E617EB7"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_9B01D8B92FE15ACCAAD5F4F4C7681FD6"
-        "OwnerKey" = "8:_E72980C058C646E0A7FAF423EB57EA6E"
+        "MsmKey" = "8:_C81AC700C1BC4A55B98DF12C0CBAFD6F"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_A044EB8034E3CED402BF9A7DB7CC4550"
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_1CFB1AB04E024FC993E0EB4859DF8408"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
         "OwnerKey" = "8:_F0B800E719294692A02518CFD8CBAEFF"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_A0D5F714A0F94250A1C39603B699AB82"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_EF14CB99F3414BB689D0CB0E6D6B8AB8"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_A40E3F2045F44C60A8509FDFE47E6C45"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_D2EF447106B24E67907DAED3D39CFBB1"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_AD2EB44FE6D548F2A8DA4F9F2CE817AC"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_D1269F1E49D442CF8EAC96C23E60325D"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_B0A2E9B4C45D4098AFD734D0C4E3EAFB"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_BB649A2C1ABE4895859025B09A240323"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_B20769E090034897B32E3EA4EC1BA8A0"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_B20769E090034897B32E3EA4EC1BA8A0"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_C105055EE271471A999CE7022E617EB7"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_A944ADCEDF884574A23F7BA5420A6BA1"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_C81AC700C1BC4A55B98DF12C0CBAFD6F"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_A0D5F714A0F94250A1C39603B699AB82"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_CD7DAA5960C15D1769787DCAC200919C"
-        "OwnerKey" = "8:_E72980C058C646E0A7FAF423EB57EA6E"
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_83C1B93AD71B4F8F9E074F9607B60DF1"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_59CFED0C4EC0492C945E4EBC04FE965F"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_4A285D260C3748A4BEFA6E5A9004D128"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_3FBEFE0119944C6781F81104ECEF37CA"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_318FCC99E8D143D6B4F9F534E63009B3"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_2F2FEC549F02436EB87961BD1B9E5783"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_28FBC5A60B44423B8A2CC378347483CE"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_C9F3C77CAD1B477CA4024D8933D51913"
+        "OwnerKey" = "8:_2814E641538B42EFA83525986A9D5AC1"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
         "MsmKey" = "8:_D0BB09AFB8D94B76918F0EE85BCCAD0A"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
@@ -333,49 +369,55 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_D6F0F5845FAD4707975CE012A33CD607"
+        "MsmKey" = "8:_D2EF447106B24E67907DAED3D39CFBB1"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_D7EC5795A9C645AC8E129C2EE6D461ED"
+        "MsmKey" = "8:_D6F0F5845FAD4707975CE012A33CD607"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_DDC345A5D8F3411B871108AAD163F920"
-        "OwnerKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+        "MsmKey" = "8:_D7E82DD20D5B47395F635480C8E3A1D3"
+        "OwnerKey" = "8:_F0B800E719294692A02518CFD8CBAEFF"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_E4BCD553B2054B0F8BC67428E1A11674"
+        "MsmKey" = "8:_D7EC5795A9C645AC8E129C2EE6D461ED"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_E72980C058C646E0A7FAF423EB57EA6E"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_E1CC91FCF87955D17FC3C0A8E875B690"
+        "OwnerKey" = "8:_59CFED0C4EC0492C945E4EBC04FE965F"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_E763C699DF0948B6984DDEB96A2DFD06"
+        "MsmKey" = "8:_E1CC91FCF87955D17FC3C0A8E875B690"
+        "OwnerKey" = "8:_5A636BB90F7F4B86ACB8839EA2C899AA"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_E4BCD553B2054B0F8BC67428E1A11674"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_EC68A140B58841DA9B9172BAFA5BEC63"
+        "MsmKey" = "8:_E763C699DF0948B6984DDEB96A2DFD06"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_EE46A936D4054F7286909355BF2AE5D7"
+        "MsmKey" = "8:_EC68A140B58841DA9B9172BAFA5BEC63"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -614,10 +656,10 @@
             "IsDependency" = "11:TRUE"
             "IsolateTo" = "8:"
             }
-            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1BD78CCD666E4BB5BE1168302E9613A2"
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_329D8DAE6C01FCF026E9DFB48B932203"
             {
-            "SourcePath" = "8:..\\..\\libs\\apr-iconv\\Release\\libapriconv-1.dll"
-            "TargetName" = "8:libapriconv-1.dll"
+            "SourcePath" = "8:MSWSOCK.dll"
+            "TargetName" = "8:MSWSOCK.dll"
             "Tag" = "8:"
             "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
             "Condition" = "8:"
@@ -630,16 +672,16 @@
             "SharedLegacy" = "11:FALSE"
             "PackageAs" = "3:1"
             "Register" = "3:1"
-            "Exclude" = "11:FALSE"
-            "IsDependency" = "11:FALSE"
+            "Exclude" = "11:TRUE"
+            "IsDependency" = "11:TRUE"
             "IsolateTo" = "8:"
             }
-            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_36D88C9590054DCA8F6ABAE6F05C2FD6"
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_69EB1A147CC2428435BDCA35014C96E1"
             {
-            "SourcePath" = "8:..\\..\\src\\mod\\languages\\mod_perl\\fs_perl.pm"
-            "TargetName" = "8:fs_perl.pm"
+            "SourcePath" = "8:libsqlite.dll"
+            "TargetName" = "8:libsqlite.dll"
             "Tag" = "8:"
-            "Folder" = "8:_27A96C279A6A44E8A2FDF8D51CD86E29"
+            "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
             "Vital" = "11:TRUE"
@@ -650,16 +692,16 @@
             "SharedLegacy" = "11:FALSE"
             "PackageAs" = "3:1"
             "Register" = "3:1"
-            "Exclude" = "11:FALSE"
-            "IsDependency" = "11:FALSE"
+            "Exclude" = "11:TRUE"
+            "IsDependency" = "11:TRUE"
             "IsolateTo" = "8:"
             }
-            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_413E616556854689B457A68A06830A82"
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_83062AA0528B40A59202BC7668F7132A"
             {
-            "SourcePath" = "8:..\\..\\src\\mod\\languages\\mod_perl\\freeswitch.pm"
-            "TargetName" = "8:freeswitch.pm"
+            "SourcePath" = "8:..\\..\\conf\\freeswitch.xml"
+            "TargetName" = "8:freeswitch.xml"
             "Tag" = "8:"
-            "Folder" = "8:_27A96C279A6A44E8A2FDF8D51CD86E29"
+            "Folder" = "8:_06036160035041E38F4179E6DB6380C5"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
             "Vital" = "11:TRUE"
@@ -674,10 +716,10 @@
             "IsDependency" = "11:FALSE"
             "IsolateTo" = "8:"
             }
-            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_53150E807A66E04034BACF0B4D81105A"
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_879085EF680EFDF6242DCB77439EC825"
             {
-            "SourcePath" = "8:libapr-1.dll"
-            "TargetName" = "8:libapr-1.dll"
+            "SourcePath" = "8:libapr.dll"
+            "TargetName" = "8:libapr.dll"
             "Tag" = "8:"
             "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
             "Condition" = "8:"
@@ -690,16 +732,16 @@
             "SharedLegacy" = "11:FALSE"
             "PackageAs" = "3:1"
             "Register" = "3:1"
-            "Exclude" = "11:FALSE"
+            "Exclude" = "11:TRUE"
             "IsDependency" = "11:TRUE"
             "IsolateTo" = "8:"
             }
-            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_83062AA0528B40A59202BC7668F7132A"
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_91BA2668F87764F53188E93BC8D363D7"
             {
-            "SourcePath" = "8:..\\..\\conf\\freeswitch.xml"
-            "TargetName" = "8:freeswitch.xml"
+            "SourcePath" = "8:libapriconv.dll"
+            "TargetName" = "8:libapriconv.dll"
             "Tag" = "8:"
-            "Folder" = "8:_06036160035041E38F4179E6DB6380C5"
+            "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
             "Vital" = "11:TRUE"
@@ -710,14 +752,14 @@
             "SharedLegacy" = "11:FALSE"
             "PackageAs" = "3:1"
             "Register" = "3:1"
-            "Exclude" = "11:FALSE"
-            "IsDependency" = "11:FALSE"
+            "Exclude" = "11:TRUE"
+            "IsDependency" = "11:TRUE"
             "IsolateTo" = "8:"
             }
-            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9B01D8B92FE15ACCAAD5F4F4C7681FD6"
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A164EF86C4B57E41C8CE77B48F39DAC7"
             {
-            "SourcePath" = "8:libaprutil-1.dll"
-            "TargetName" = "8:libaprutil-1.dll"
+            "SourcePath" = "8:libaprutil.dll"
+            "TargetName" = "8:libaprutil.dll"
             "Tag" = "8:"
             "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
             "Condition" = "8:"
@@ -730,14 +772,14 @@
             "SharedLegacy" = "11:FALSE"
             "PackageAs" = "3:1"
             "Register" = "3:1"
-            "Exclude" = "11:FALSE"
+            "Exclude" = "11:TRUE"
             "IsDependency" = "11:TRUE"
             "IsolateTo" = "8:"
             }
-            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A044EB8034E3CED402BF9A7DB7CC4550"
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A3936A2727E73289F5804D5DA006FD0A"
             {
-            "SourcePath" = "8:FreeSwitch.dll"
-            "TargetName" = "8:FreeSwitch.dll"
+            "SourcePath" = "8:RPCRT4.dll"
+            "TargetName" = "8:RPCRT4.dll"
             "Tag" = "8:"
             "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
             "Condition" = "8:"
@@ -774,10 +816,10 @@
             "IsDependency" = "11:FALSE"
             "IsolateTo" = "8:"
             }
-            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_CD7DAA5960C15D1769787DCAC200919C"
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_D7E82DD20D5B47395F635480C8E3A1D3"
             {
-            "SourcePath" = "8:sqlite.dll"
-            "TargetName" = "8:sqlite.dll"
+            "SourcePath" = "8:FreeSwitch.dll"
+            "TargetName" = "8:FreeSwitch.dll"
             "Tag" = "8:"
             "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
             "Condition" = "8:"
@@ -790,10 +832,30 @@
             "SharedLegacy" = "11:FALSE"
             "PackageAs" = "3:1"
             "Register" = "3:1"
-            "Exclude" = "11:FALSE"
+            "Exclude" = "11:TRUE"
             "IsDependency" = "11:TRUE"
             "IsolateTo" = "8:"
             }
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_E1CC91FCF87955D17FC3C0A8E875B690"
+            {
+            "SourcePath" = "8:WLDAP32.dll"
+            "TargetName" = "8:WLDAP32.dll"
+            "Tag" = "8:"
+            "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:TRUE"
+            "IsDependency" = "11:TRUE"
+            "IsolateTo" = "8:"
+            }
         }
         "FileType"
         {
@@ -905,7 +967,7 @@
         "Name" = "8:Microsoft Visual Studio"
         "ProductName" = "8:Freeswitch"
         "ProductCode" = "8:{317A9CC0-40DC-4803-A13E-5937F05F9D2E}"
-        "PackageCode" = "8:{F5FFEAA8-6C32-4FFC-9DA5-FC799FDB8B8F}"
+        "PackageCode" = "8:{35A30F10-964D-4C59-A882-360D2CAC47EC}"
         "UpgradeCode" = "8:{8080E3A5-7ADD-4173-8913-BDA439D1C8DD}"
         "RestartWWWService" = "11:FALSE"
         "RemovePreviousVersions" = "11:FALSE"
@@ -1536,30 +1598,30 @@
         }
         "MergeModule"
         {
-            "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_8FC4214A35474C90B4FFD16CA8F225D4"
+            "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_81546E20D5C640AC84C7B7E100280727"
             {
             "UseDynamicProperties" = "11:TRUE"
             "IsDependency" = "11:TRUE"
-            "SourcePath" = "8:Microsoft_VC80_DebugCRT_x86.msm"
+            "SourcePath" = "8:policy_8_0_microsoft_vc80_debugcrt_x86.msm"
                 "Properties"
                 {
                 }
             "LanguageId" = "3:0"
-            "Exclude" = "11:TRUE"
+            "Exclude" = "11:FALSE"
             "Folder" = "8:"
             "Feature" = "8:"
             "IsolateTo" = "8:"
             }
-            "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_DDC345A5D8F3411B871108AAD163F920"
+            "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_C9F3C77CAD1B477CA4024D8933D51913"
             {
             "UseDynamicProperties" = "11:TRUE"
             "IsDependency" = "11:TRUE"
-            "SourcePath" = "8:policy_8_0_microsoft_vc80_debugcrt_x86.msm"
+            "SourcePath" = "8:Microsoft_VC80_DebugCRT_x86.msm"
                 "Properties"
                 {
                 }
             "LanguageId" = "3:0"
-            "Exclude" = "11:TRUE"
+            "Exclude" = "11:FALSE"
             "Folder" = "8:"
             "Feature" = "8:"
             "IsolateTo" = "8:"
@@ -1567,9 +1629,9 @@
         }
         "ProjectOutput"
         {
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_10A983E896C14286A47AAB6A8570EE6D"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_1CFB1AB04E024FC993E0EB4859DF8408"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_ivrtest.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_dingaling.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -1589,15 +1651,15 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{419AA391-5F3F-4BFE-A869-9D154D62A792}"
+            "OutputProjectGuid" = "8:{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_1CFB1AB04E024FC993E0EB4859DF8408"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_2814E641538B42EFA83525986A9D5AC1"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_dingaling.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_ilbc.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -1617,18 +1679,18 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}"
+            "OutputProjectGuid" = "8:{D3EC0AFF-76FC-4210-A825-9A17410660A3}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_1F21CF104E90499E8F6BBD2136A52884"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_28FBC5A60B44423B8A2CC378347483CE"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_cepstral.dll"
+            "SourcePath" = "8:..\\..\\debug\\libapr.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
-            "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
+            "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
             "Vital" = "11:TRUE"
@@ -1645,15 +1707,15 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{692F6330-4D87-4C82-81DF-40DB5892636E}"
+            "OutputProjectGuid" = "8:{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_2814E641538B42EFA83525986A9D5AC1"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_2D09AB81AB8D45FF97E9DFA4DAC3465D"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_ilbc.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_zeroconf.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -1673,15 +1735,15 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{D3EC0AFF-76FC-4210-A825-9A17410660A3}"
+            "OutputProjectGuid" = "8:{C7705DC4-2088-493E-AF8D-65BC6D65C125}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_2D09AB81AB8D45FF97E9DFA4DAC3465D"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_2F2FEC549F02436EB87961BD1B9E5783"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_zeroconf.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_iax.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -1701,15 +1763,15 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{C7705DC4-2088-493E-AF8D-65BC6D65C125}"
+            "OutputProjectGuid" = "8:{3A5B9131-F20C-4A85-9447-6C1610941CEE}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_2F2FEC549F02436EB87961BD1B9E5783"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_318FCC99E8D143D6B4F9F534E63009B3"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_iax.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_sndfile.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -1729,18 +1791,18 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{3A5B9131-F20C-4A85-9447-6C1610941CEE}"
+            "OutputProjectGuid" = "8:{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_318FCC99E8D143D6B4F9F534E63009B3"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_3FBEFE0119944C6781F81104ECEF37CA"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_sndfile.dll"
+            "SourcePath" = "8:..\\..\\debug\\libapriconv.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
-            "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
+            "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
             "Vital" = "11:TRUE"
@@ -1757,7 +1819,7 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}"
+            "OutputProjectGuid" = "8:{101130D1-3EA6-4ED2-B65D-CEB5243A20ED}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
@@ -1765,7 +1827,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_4A285D260C3748A4BEFA6E5A9004D128"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_spidermonkey.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_spidermonkey.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -1791,12 +1853,12 @@
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_5A636BB90F7F4B86ACB8839EA2C899AA"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_59CFED0C4EC0492C945E4EBC04FE965F"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_ldap.dll"
+            "SourcePath" = "8:..\\..\\debug\\libaprutil.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
-            "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
+            "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
             "Vital" = "11:TRUE"
@@ -1813,15 +1875,15 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{EC3E5C7F-EE09-47E2-80FE-546363D14A98}"
+            "OutputProjectGuid" = "8:{F057DA7F-79E5-4B00-845C-EF446EF055E3}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_6753CE9F969E43A2A50ADEC0245F58A4"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_5A636BB90F7F4B86ACB8839EA2C899AA"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_perl.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_ldap.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -1841,7 +1903,7 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{7B077E7F-1BE7-4291-AB86-55E527B25CAC}"
+            "OutputProjectGuid" = "8:{EC3E5C7F-EE09-47E2-80FE-546363D14A98}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
@@ -1849,7 +1911,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_684D96FA2BDD46909367E651099D8C4E"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_dialplan_directory.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_dialplan_directory.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -1877,7 +1939,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_6E5C001E7A314DCEA0A4BF52BF74BCAD"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_speex.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_speex.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -1905,7 +1967,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_72A8732C0C0C4D0EAAE89DBB82073335"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_playback.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_playback.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -1933,7 +1995,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_7358123D2D064AD1BC517911A8B23D1B"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_softtimer.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_softtimer.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -1961,7 +2023,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_83C1B93AD71B4F8F9E074F9607B60DF1"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_xmpp_event.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_xmpp_event.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -1989,7 +2051,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_87768631363249B2B301143C193612F7"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_g711.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_g711.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2017,7 +2079,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_9A293E8A356A4959BB6E541B7DC213CD"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_bridgecall.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_bridgecall.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2045,7 +2107,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_A0D5F714A0F94250A1C39603B699AB82"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\libteletone.dll"
+            "SourcePath" = "8:..\\..\\libs\\libteletone\\Debug\\libteletone.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
@@ -2071,9 +2133,37 @@
                 {
                 }
             }
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_A944ADCEDF884574A23F7BA5420A6BA1"
+            {
+            "SourcePath" = "8:..\\..\\debug\\libsqlite.dll"
+            "TargetName" = "8:"
+            "Tag" = "8:"
+            "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            "ProjectOutputGroupRegister" = "3:1"
+            "OutputConfiguration" = "8:"
+            "OutputGroupCanonicalName" = "8:Built"
+            "OutputProjectGuid" = "8:{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}"
+            "ShowKeyOutput" = "11:TRUE"
+                "ExcludeFilters"
+                {
+                }
+            }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_AD2EB44FE6D548F2A8DA4F9F2CE817AC"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_l16.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_l16.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2101,7 +2191,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_B0A2E9B4C45D4098AFD734D0C4E3EAFB"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_conference.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_conference.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2129,7 +2219,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_B20769E090034897B32E3EA4EC1BA8A0"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_gsm.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_gsm.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2155,12 +2245,12 @@
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_C105055EE271471A999CE7022E617EB7"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_BB649A2C1ABE4895859025B09A240323"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_commands.dll"
+            "SourcePath" = "8:..\\..\\debug\\libpcre.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
-            "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
+            "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
             "Vital" = "11:TRUE"
@@ -2177,15 +2267,15 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}"
+            "OutputProjectGuid" = "8:{8D04B550-D240-4A44-8A18-35DA3F7038D9}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_C81AC700C1BC4A55B98DF12C0CBAFD6F"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_C105055EE271471A999CE7022E617EB7"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_dialplan_xml.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_commands.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2205,15 +2295,15 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{07113B25-D3AF-4E04-BA77-4CD1171F022C}"
+            "OutputProjectGuid" = "8:{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D0BB09AFB8D94B76918F0EE85BCCAD0A"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_C81AC700C1BC4A55B98DF12C0CBAFD6F"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_dptools.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_dialplan_xml.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2233,15 +2323,15 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{B5881A85-FE70-4F64-8607-2CAAE52669C6}"
+            "OutputProjectGuid" = "8:{07113B25-D3AF-4E04-BA77-4CD1171F022C}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D1269F1E49D442CF8EAC96C23E60325D"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D0BB09AFB8D94B76918F0EE85BCCAD0A"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_xml_rpc.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_dptools.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2261,15 +2351,15 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{CBEC7225-0C21-4DA8-978E-1F158F8AD950}"
+            "OutputProjectGuid" = "8:{B5881A85-FE70-4F64-8607-2CAAE52669C6}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D6F0F5845FAD4707975CE012A33CD607"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D1269F1E49D442CF8EAC96C23E60325D"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_rss.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_xml_rpc.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2289,18 +2379,18 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}"
+            "OutputProjectGuid" = "8:{CBEC7225-0C21-4DA8-978E-1F158F8AD950}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D7EC5795A9C645AC8E129C2EE6D461ED"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D2EF447106B24E67907DAED3D39CFBB1"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_event_multicast.dll"
+            "SourcePath" = "8:..\\..\\debug\\FreeSwitch.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
-            "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
+            "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
             "Vital" = "11:TRUE"
@@ -2317,15 +2407,15 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{784113EF-44D9-4949-835D-7065D3C7AD08}"
+            "OutputProjectGuid" = "8:{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_E4BCD553B2054B0F8BC67428E1A11674"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D6F0F5845FAD4707975CE012A33CD607"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_echo.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_rss.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2345,18 +2435,18 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{0E2C6395-13B9-46E5-9264-8859D346018D}"
+            "OutputProjectGuid" = "8:{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_E72980C058C646E0A7FAF423EB57EA6E"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D7EC5795A9C645AC8E129C2EE6D461ED"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\FreeSwitch.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_event_multicast.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
-            "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
+            "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
             "Vital" = "11:TRUE"
@@ -2373,15 +2463,15 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}"
+            "OutputProjectGuid" = "8:{784113EF-44D9-4949-835D-7065D3C7AD08}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_E763C699DF0948B6984DDEB96A2DFD06"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_E4BCD553B2054B0F8BC67428E1A11674"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_PortAudio.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_echo.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2401,15 +2491,15 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{5FD31A25-5D83-4794-8BEE-904DAD84CE71}"
+            "OutputProjectGuid" = "8:{0E2C6395-13B9-46E5-9264-8859D346018D}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_EC68A140B58841DA9B9172BAFA5BEC63"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_E763C699DF0948B6984DDEB96A2DFD06"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_exosip.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_PortAudio.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2429,18 +2519,18 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}"
+            "OutputProjectGuid" = "8:{5FD31A25-5D83-4794-8BEE-904DAD84CE71}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
                 }
             }
-            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_EE46A936D4054F7286909355BF2AE5D7"
+            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_EC68A140B58841DA9B9172BAFA5BEC63"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\perl\\fs_perl.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_exosip.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
-            "Folder" = "8:_27A96C279A6A44E8A2FDF8D51CD86E29"
+            "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
             "Vital" = "11:TRUE"
@@ -2457,7 +2547,7 @@
             "ProjectOutputGroupRegister" = "3:1"
             "OutputConfiguration" = "8:"
             "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{B0C6CFF9-7DCD-4A21-8BA4-C2011E18DED8}"
+            "OutputProjectGuid" = "8:{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}"
             "ShowKeyOutput" = "11:TRUE"
                 "ExcludeFilters"
                 {
@@ -2465,7 +2555,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_EF14CB99F3414BB689D0CB0E6D6B8AB8"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_console.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_console.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2493,7 +2583,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_F0B800E719294692A02518CFD8CBAEFF"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\FreeSwitch.exe"
+            "SourcePath" = "8:..\\..\\debug\\FreeSwitch.exe"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
@@ -2521,7 +2611,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_F84240319757424DB1C58AD0AD420127"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_event_test.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_event_test.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"
@@ -2549,7 +2639,7 @@
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_FB1B9FBDC3294F1C96DAC4246C013C22"
             {
-            "SourcePath" = "8:..\\vsnet\\Debug\\mod\\mod_woomera.dll"
+            "SourcePath" = "8:..\\..\\debug\\mod\\mod_woomera.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_B6E020422C78490D96F78DB0E1A3F521"

Modified: freeswitch/branches/mishehu/w32/vsnet/FreeSwitchConsole.vcproj
==============================================================================
--- freeswitch/branches/mishehu/w32/vsnet/FreeSwitchConsole.vcproj	(original)
+++ freeswitch/branches/mishehu/w32/vsnet/FreeSwitchConsole.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,11 +17,12 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="1"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
+			BuildLogFile="$(IntDir)\BuildLog $(ProjectName).htm"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -50,7 +51,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -63,8 +64,8 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/FreeSwitch.exe"
-				LinkIncremental="2"
+				OutputFile="$(SolutionDir)$(ConfigurationName)/FreeSwitch.exe"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="$(OutDir)"
 				GenerateDebugInformation="true"
 				ProgramDatabaseFile="$(OutDir)/FreeSwitchConsole.pdb"
@@ -98,11 +99,12 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="1"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
+			BuildLogFile="$(IntDir)\BuildLog $(ProjectName).htm"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -141,10 +143,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/FreeSwitch.exe"
+				OutputFile="$(SolutionDir)$(ConfigurationName)/FreeSwitch.exe"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="$(OutDir)"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/FreeSwitchConsole.pdb"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"

Modified: freeswitch/branches/mishehu/w32/vsnet/FreeSwitchCore.vcproj
==============================================================================
--- freeswitch/branches/mishehu/w32/vsnet/FreeSwitchCore.vcproj	(original)
+++ freeswitch/branches/mishehu/w32/vsnet/FreeSwitchCore.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,11 +17,12 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
+			BuildLogFile="$(IntDir)\BuildLog $(ProjectName).htm"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -42,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include"
+				AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include;..\..\libs\srtp\include;..\..\libs\srtp\crypto\include;&quot;..\..\libs\libresample-0.1.3\include&quot;"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -54,7 +55,7 @@
 				WarningLevel="4"
 				WarnAsError="true"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 				ForcedIncludeFiles=""
 			/>
 			<Tool
@@ -68,10 +69,10 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				LinkLibraryDependencies="false"
-				AdditionalDependencies="Ws2_32.lib Mswsock.lib libapr-1.lib sqlite.lib libapriconv-1.lib libaprutil-1.lib Rpcrt4.lib libresampled.lib srtp.lib"
-				OutputFile="$(OutDir)/FreeSwitch.dll"
-				LinkIncremental="2"
+				LinkLibraryDependencies="true"
+				AdditionalDependencies="Ws2_32.lib Mswsock.lib Rpcrt4.lib"
+				OutputFile="$(SolutionDir)$(ConfigurationName)/FreeSwitch.dll"
+				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\libs\apr\$(OutDir)&quot;;&quot;$(InputDir)..\..\libs\sqlite\$(OutDir) DLL&quot;;&quot;$(InputDir)..\..\libs\apr-util\$(OutDir)&quot;;&quot;$(InputDir)..\..\libs\apr-iconv\$(OutDir)&quot;;&quot;$(InputDir)..\..\libs\libresample\win&quot;;&quot;$(InputDir)..\..\libs\srtp\$(OutDir)&quot;"
 				AddModuleNamesToAssembly=""
 				GenerateDebugInformation="true"
@@ -105,16 +106,17 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				CommandLine="xcopy $(Projectdir)..\..\conf\*.* $(Outdir)\conf\ /C /D /Y&#x0D;&#x0A;xcopy &quot;$(Projectdir)..\..\libs\sqlite\$(IntDir) DLL\*.dll&quot; $(Outdir)\ /C /D /Y&#x0D;&#x0A;xcopy &quot;$(Projectdir)..\..\libs\sqlite\$(IntDir) DLL\*.lib&quot; $(Outdir)\ /C /D /Y&#x0D;&#x0A;if not exist $(Outdir)\db md  $(Outdir)\db&#x0D;&#x0A;if not exist $(Outdir)\log md  $(Outdir)\log&#x0D;&#x0A;if not exist $(Outdir)\log md  $(Outdir)\htdocs&#x0D;&#x0A;&#x0D;&#x0A;"
+				CommandLine="xcopy $(SolutionDir)conf\*.* $(SolutionDir)$(OutDir)\conf\ /C /D /Y&#x0D;&#x0A;if not exist $(SolutionDir)$(OutDir)\db md  $(SolutionDir)$(OutDir)\db&#x0D;&#x0A;if not exist $(SolutionDir)$(OutDir)\log md  $(SolutionDir)$(OutDir)\log&#x0D;&#x0A;if not exist $(SolutionDir)$(OutDir)\log md  $(SolutionDir)$(OutDir)\htdocs&#x0D;&#x0A;&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
+			BuildLogFile="$(IntDir)\BuildLog $(ProjectName).htm"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -134,8 +136,8 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS"
+				AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include;..\..\libs\srtp\include;..\..\libs\srtp\crypto\include;&quot;..\..\libs\libresample-0.1.3\include&quot;"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS;CRASH_PROT"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="2"
 				PrecompiledHeaderThrough="switch.h"
@@ -157,12 +159,13 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				LinkLibraryDependencies="false"
-				AdditionalDependencies="Ws2_32.lib Mswsock.lib libapr-1.lib sqlite.lib libapriconv-1.lib libaprutil-1.lib Rpcrt4.lib libresample.lib srtp.lib"
-				OutputFile="$(OutDir)/FreeSwitch.dll"
+				LinkLibraryDependencies="true"
+				AdditionalDependencies="Ws2_32.lib Mswsock.lib Rpcrt4.lib"
+				OutputFile="$(SolutionDir)$(ConfigurationName)/FreeSwitch.dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(InputDir)..\..\libs\apr\$(OutDir)&quot;;&quot;$(InputDir)..\..\libs\sqlite\$(OutDir) DLL&quot;;&quot;$(InputDir)..\..\libs\apr-util\$(OutDir)&quot;;&quot;$(InputDir)..\..\libs\apr-iconv\$(OutDir)&quot;;&quot;$(InputDir)..\..\libs\libresample\win&quot;;&quot;$(InputDir)..\..\libs\srtp\$(OutDir)&quot;"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/FreeSwitchCore.pdb"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -192,7 +195,7 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				CommandLine="xcopy $(Projectdir)..\..\conf\*.* $(Outdir)\conf\ /C /D /Y&#x0D;&#x0A;xcopy &quot;$(Projectdir)..\..\libs\sqlite\$(IntDir) DLL\*.dll&quot; $(Outdir)\ /C /D /Y&#x0D;&#x0A;xcopy &quot;$(Projectdir)..\..\libs\sqlite\$(IntDir) DLL\*.lib&quot; $(Outdir)\ /C /D /Y&#x0D;&#x0A;if not exist $(Outdir)\db md  $(Outdir)\db&#x0D;&#x0A;if not exist $(Outdir)\log md  $(Outdir)\log&#x0D;&#x0A;if not exist $(Outdir)\log md  $(Outdir)\htdocs&#x0D;&#x0A;&#x0D;&#x0A;"
+				CommandLine="xcopy $(SolutionDir)conf\*.* $(SolutionDir)$(OutDir)\conf\ /C /D /Y&#x0D;&#x0A;if not exist $(SolutionDir)$(OutDir)\db md  $(SolutionDir)$(OutDir)\db&#x0D;&#x0A;if not exist $(SolutionDir)$(OutDir)\log md  $(SolutionDir)$(OutDir)\log&#x0D;&#x0A;if not exist $(SolutionDir)$(OutDir)\log md  $(SolutionDir)$(OutDir)\htdocs&#x0D;&#x0A;&#x0D;&#x0A;"
 			/>
 		</Configuration>
 	</Configurations>

Modified: freeswitch/branches/mishehu/w32/vsnet/FreeSwitchVersion.vcproj
==============================================================================
--- freeswitch/branches/mishehu/w32/vsnet/FreeSwitchVersion.vcproj	(original)
+++ freeswitch/branches/mishehu/w32/vsnet/FreeSwitchVersion.vcproj	Sun Aug 27 11:43:21 2006
@@ -17,11 +17,12 @@
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="10"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
+			BuildLogFile="$(IntDir)\BuildLog $(ProjectName).htm"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -40,11 +41,12 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="10"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
+			BuildLogFile="$(IntDir)\BuildLog $(ProjectName).htm"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"

Modified: freeswitch/branches/mishehu/w32/vsnet/GetLibs.vbs
==============================================================================
--- freeswitch/branches/mishehu/w32/vsnet/GetLibs.vbs	(original)
+++ freeswitch/branches/mishehu/w32/vsnet/GetLibs.vbs	Sun Aug 27 11:43:21 2006
@@ -162,21 +162,6 @@
 	If Not FSO.FolderExists(LibDestDir & "include") Then
 		FSO.CreateFolder(LibDestDir & "include")
 	End If
-	BuildLibs_apr BuildDebug, BuildRelease
-	FSO.CopyFile LibDestDir & "apr\include\*.h", LibDestDir & "include"
-	BuildLibs_apriconv BuildDebug, BuildRelease
-	FSO.CopyFile LibDestDir & "apr-iconv\include\*.h", LibDestDir & "include"
-	BuildLibs_aprutil BuildDebug, BuildRelease
-	FSO.CopyFile LibDestDir & "apr-util\include\*.h", LibDestDir & "include"
-	BuildLibs_libresample BuildDebug, BuildRelease
-	FSO.CopyFile LibDestDir & "libresample\include\*.h", LibDestDir & "include"
-	BuildLibs_sqlite BuildDebug, BuildRelease	
-	FSO.CopyFile LibDestDir & "sqlite\*.h", LibDestDir & "include"
-	BuildLibs_srtp BuildDebug, BuildRelease
-	FSO.CopyFile LibDestDir & "srtp\include\*.h", LibDestDir & "include"
-	FSO.CopyFile LibDestDir & "srtp\crypto\include\*.h", LibDestDir & "include"
-	BuildLibs_pcre BuildDebug, BuildRelease
-	FSO.CopyFile LibDestDir & "pcre\win32\pcre.h", LibDestDir & "include"
 End If
 
 If BuildModXMLRpc Then
@@ -195,7 +180,7 @@
 
 If BuildModDingaling Then
 	BuildLibs_iksemel BuildDebug, BuildRelease
-	BuildLibs_libdingaling BuildDebug, BuildRelease
+'	BuildLibs_libdingaling BuildDebug, BuildRelease
 End If
 
 If BuildModIaxChan Then



More information about the Freeswitch-svn mailing list